Hi,
The problem is that you’re doing a forward in a network. And if you don’t disable the autograd, then all the buffers are saved to be able to backprop when you want.
Then you save that output in another Tensor thus keeping this whole history around.
If you just want to do evaluation, you should disable GradMode (not sure where it is in the cpp doc).