Solved by vabh in post #2 
              
              
                They are actually the same, and so should be identical it terms of speed 
Is you look at the source, nn.Tanh uses torch.tanh in its forward method.