Solved by albanD in post #2 
              
              
                Hi, 
.data is in the process of being removed and should not be used. As you have experienced, it only does very confusing things  
You will need to have only nn.Parameters to be the true parameters and you will have to recompute other things at each forward: 
import torch
import torch.nn as nn
impo…