Solved by vmirly1 in post #9 
              
              
                As @alex.veuthey has indicated, passing model.parameters() is a reference to the parameters that needs to be learned, the initial values do not matter. Creating an optimizer needs this reference, otherwise, having an optimizer is point-less. 
So, the steps are as follows: 

Create an initial model
C…