Hello Granth -



 granth_jain:

I am trying to understand why sigmoid is a class in pytorch and not tanh.


I’m not quite sure what you’re asking, but just to be clear, pytorch does
have both a class and a function version of Tanh:
torch.nn.Tanh
torch.nn.functional.tanh
(Pytorch also has both a class and function version of Sigmoid.)
As an aside, note that pytorch’s sigmoid() is the so-called logistic
function, and that is essentially the same function as tanh().
Best.
K. Frank