pytorch-dual-learning icon indicating copy to clipboard operation
pytorch-dual-learning copied to clipboard

when I run dual.py and the step is around 1000, there is error "RuntimeError: cuda runtime error (2) : out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:58"

Open LDONT opened this issue 6 years ago • 0 comments

I run dual.py with GPU 1080Ti and the memory size is 12G. The corpus sizes of nmt and lm are both no more than 50M. But when the step of dual is around 1000, there is error: Traceback (most recent call last): File "/ghome/weiyt/pytorch-dual-learning/dual.py", line 202, in dual(args) File "/ghome/weiyt/pytorch-dual-learning/dual.py", line 153, in dual B_loss.backward() File "/usr/local/lib/python3.6/dist-packages/torch/autograd/variable.py", line 167, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables) File "/usr/local/lib/python3.6/dist-packages/torch/autograd/init.py", line 99, in backward variables, grad_variables, retain_graph) RuntimeError: cuda runtime error (2) : out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:58

LDONT avatar May 18 '18 03:05 LDONT