Solved by albanD in post #2 
              
              
                Hi, 
No naming of your variable will be a problem for autograd. 
Autograd works “below” torch.nn so you can set up your network whichever way you want and it will work just fine.