Pytorch nn tutorial, passing data confusion

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

and the tutorial is in here:

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