Hi Nihal!



 Eulerian:

print(optimizer)

Is there a way in which I could just get SGD as the output (and same for other optimizers also)?


print (type (optimizer).__name__)

will do what you want.
(This is generally true for python objects, and is not specific to pytorch.)
Best.
K. Frank