yanx27 / EverybodyDanceNow_reproduce_pytorch

Everybody dance now reproduced in pytorch
MIT License
605 stars 173 forks source link

RuntimeError: CUDA error: out of memory #31

Open benoitoutlook opened 5 years ago

benoitoutlook commented 5 years ago

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!

ShaocongZheng commented 5 years ago

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

ShaocongZheng commented 5 years ago

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

Psychofun commented 5 years ago

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

Llhai commented 4 years ago

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

aoxiangzhang commented 3 years ago

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

thx