Applies the Tanh function element-wise to the input Tensor, thus outputting a Tensor of the same dimension.