Thanks for your reply. In this case, if I want to use numpy to perform some computations in the middle of my network, is there a way to do it? I noticed the only way to convert a tensor to numpy in a network is to first detach it