Solved by ptrblck in post #2 
              
              
                Currently you are re-creating a nn.Linear layer in your forward method in each call. 
This will reinitialize its parameters in each forward pass, so that this layer won’t be able to learn anything. 
That being said, the to() operator also cannot push this module to the device, so that you would have…