Solved by ptrblck in post #2 
              
              
                Could you remove the numpy() call from self.c and rerun the code? 
Generally, if you don’t need to use another lib, I would recommend to use PyTorch methods only. 
This will make sure that Autograd is able to keep track of all operations and create the backward pass for you automatically. 
If you ne…