I’m having an issue with properly deleting PyTorch objects from memory. With this Tensor:



test = torch.Tensor(1000,1000)



Then delete the object:



del test



CUDA memory is not freed up.
Is there a clean way to delete a PyTorch object from CUDA memory?