Solved by KFrank in post #2 
              
              
                Hi shinra! 

This is more of a python question than something specific to pytorch. 
In: 
    for param in model.parameters():

param is python variable which means that it’s a reference to 
something.  In each iteration through the for loop it is set to refer 
to one of the model.parameters(). 
But …