Pytorch nn tutorial, passing data confusion

Hi,
I have written a post in stackoverflow regarding one of the examples in pytorch toturial:

and the tutorial is in here:
https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html

Could anybody, please explain how optim, net and criterion are related together. It only makes sense for me if the backward, and optimization happens under the Net class.

This post should help you. :

1 Like