Solved by ptrblck in post #2 
              
              
                That won’t work as you are detaching the computation graph by calling numpy operations. 
Autograd won’t be able to keep record of these operations, so that you won’t be able to simply backpropagate. 
If you need the numpy functions, you would need to implement your own backward function and it shoul…