-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when runing the example meet a issue,out of memory #174
Comments
Unfortunately, your GPU runs out of memory. IIRC, the cyclegan with batch size 1 and 256x256 resolution needs 3G-5G GPU memory with cuDNN. Please check that you have cuDNN installed and maybe reduce batch size and/or resolution. Btw, which pytorch version are you using? |
It takes 3.8 GB on my GTX 1080. You probably need a larger GPU or train models at a lower resolution (128p). |
For anyone who searched 'Out of memory' to get here
So... I shutdown my x-server then provide full gtx745 4G gpu to train on 256x256, can not go further without a better gpu : ( |
@lxj616 when you use CPU mode, it is unable to perform as many calculations in parallel compared with a GPU and thus has to hold more in memory |
model [CycleGANModel] was created
create web directory ./checkpoints/maps_cyclegan/web...
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1513363039688/work/torch/lib/
Traceback (most recent call last):
File "train.py", line 27, in
model.optimize_parameters()
File "/home/wuchen/Downloads/pytorch-CycleGAN-and-pix2pix/models/cycle_gan_mod
self.backward_G()
File "/home/wuchen/Downloads/pytorch-CycleGAN-and-pix2pix/models/cycle_gan_mod
rec_B = self.netG_A(fake_A)
File "/home/wuchen/anaconda2/lib/python2.7/site-packages/torch/nn/modules/modu
result = self.forward(*input, **kwargs)
File "/home/wuchen/Downloads/pytorch-CycleGAN-and-pix2pix/models/networks.py",
return nn.parallel.data_parallel(self.model, input, self.gpu_ids)
File "/home/wuchen/anaconda2/lib/python2.7/site-packages/torch/nn/parallel/dat
return module(*inputs[0], **module_kwargs[0])
File "/home/wuchen/anaconda2/lib/python2.7/site-packages/torch/nn/modules/modu
result = self.forward(*input, **kwargs)
File "/home/wuchen/anaconda2/lib/python2.7/site-packages/torch/nn/modules/cont
input = module(input)
File "/home/wuchen/anaconda2/lib/python2.7/site-packages/torch/nn/modules/modu
result = self.forward(*input, **kwargs)
File "/home/wuchen/anaconda2/lib/python2.7/site-packages/torch/nn/modules/conv
self.padding, self.dilation, self.groups)
File "/home/wuchen/anaconda2/lib/python2.7/site-packages/torch/nn/functional.p
return f(input, weight, bias)
RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytcu:58
The text was updated successfully, but these errors were encountered: