Skip to content

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" #5

@LDONT

Description

@LDONT

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions