Pytorch Cannot allocate memory

I cannot thank you enough for this post! In the last few weeks, I have been losing my mind: I work on Graph Neural Network and was pre-processing torch_geometric.data.Data objects using multiprocessing. After a few minutes I got the same error as you, although my machine had over 200GB RAM left. Adding a simple .clone() to my data-objects solved the problem and now everything works as expected

1 Like