Ok this is not what I am observing though. Am I keeping weird references to the tensor somewhere? I have “fixed” my script with storing numpy arrays, but I am loosing a lot in performance, about twice the time it took with storing tensor arrays. Is there a fast way to copy numpy arrays into a tensor reference of the same size, eg avoiding using torch.from_numpy()?