EverybodyDanceNow_reproduce_pytorch icon indicating copy to clipboard operation
EverybodyDanceNow_reproduce_pytorch copied to clipboard

RuntimeError: CUDA error: out of memory

Open benoitoutlook opened this issue 5 years ago • 5 comments

Windows 10 Env

Python 3.6.5

run: python train_pose2vid.py

I got:

Traceback (most recent call last): File "train_pose2vid.py", line 127, in main() File "train_pose2vid.py", line 59, in main Variable(data['image']), Variable(data['feat']), infer=save_fake) File "d:\Anaconda3\envs\py365\lib\site-packages\torch\nn\modules\module.py", line 477, in call result = self.forward(*input, **kwargs) File "D:\githubs\EverybodyDanceNow_reproduce_pytorch\src\pix2pixHD\models\pix2pixHD_model.py", line 195, in forward loss_G_VGG = self.criterionVGG(fake_image, real_image) * self.opt.lambda_feat File "d:\Anaconda3\envs\py365\lib\site-packages\torch\nn\modules\module.py", line 477, in call result = self.forward(*input, **kwargs) File "D:\githubs\EverybodyDanceNow_reproduce_pytorch\src\pix2pixHD\models\networks.py", line 123, in forward x_vgg, y_vgg = self.vgg(x), self.vgg(y) File "d:\Anaconda3\envs\py365\lib\site-packages\torch\nn\modules\module.py", line 477, in call result = self.forward(*input, **kwargs) File "D:\githubs\EverybodyDanceNow_reproduce_pytorch\src\pix2pixHD\models\networks.py", line 417, in forward h_relu5 = self.slice5(h_relu4) File "d:\Anaconda3\envs\py365\lib\site-packages\torch\nn\modules\module.py", line 477, in call result = self.forward(*input, **kwargs) File "d:\Anaconda3\envs\py365\lib\site-packages\torch\nn\modules\container.py", line 91, in forward input = module(input) File "d:\Anaconda3\envs\py365\lib\site-packages\torch\nn\modules\module.py", line 477, in call result = self.forward(*input, **kwargs) File "d:\Anaconda3\envs\py365\lib\site-packages\torch\nn\modules\conv.py", line 301, in forward self.padding, self.dilation, self.groups) RuntimeError: CUDA error: out of memory

Any help is appreciated!

benoitoutlook avatar Mar 22 '19 18:03 benoitoutlook

I met the same problem. Do anybody know how to solve it? Thx a lot!

ShaocongZheng avatar Mar 23 '19 13:03 ShaocongZheng

my batchsize is 1. i don not understand why it,s stil out of memory.

ShaocongZheng avatar Mar 23 '19 14:03 ShaocongZheng

Models used are very big. I have the same problem with my GPU with 4GB or RAM. :c Better user google collaboratory. :v

Psychofun avatar Aug 07 '19 18:08 Psychofun

changed the loadSize fineSize from 512 to lower,then can run

Llhai avatar Nov 07 '19 02:11 Llhai

changed the loadSize fineSize from 512 to lower,then can run

thx

aoxiangzhang avatar Nov 21 '20 13:11 aoxiangzhang