Torch.tanh vs torch.nn.functional.tanh

Or you could still use torch.tanh():

output = input.tanh()
5 Likes