pix2pixHD icon indicating copy to clipboard operation
pix2pixHD copied to clipboard

run test

Open shoana3226 opened this issue 3 years ago • 0 comments

when i run test.py with the comand "python test.py --name label2city_1024p --netG local --ngf 32 --resize_or_crop none" i only can run 1 image and then it will crash print"cuda out of memory" but I have 11G ram for use

the log /home/docker/pix2pixHD/pix2pixHD-form_gitee/models/pix2pixHD_model.py:128: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. input_label = Variable(input_label, volatile=infer) process image... ['./datasets/cityscapes/test_label/frankfurt_000000_000576_gtFine_labelIds.png'] Traceback (most recent call last): File "test.py", line 60, in generated = model.inference(data['label'], data['inst'], data['image']) File "/home/docker/pix2pixHD/pix2pixHD-form_gitee/models/pix2pixHD_model.py", line 216, in inference fake_image = self.netG.forward(input_concat) File "/home/docker/pix2pixHD/pix2pixHD-form_gitee/models/networks.py", line 180, in forward output_prev = model_upsample(model_downsample(input_i) + output_prev) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/container.py", line 100, in forward input = module(input) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/home/docker/pix2pixHD/pix2pixHD-form_gitee/models/networks.py", line 252, in forward out = x + self.conv_block(x) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/container.py", line 100, in forward input = module(input) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/padding.py", line 163, in forward return F.pad(input, self.padding, 'reflect') File "/usr/local/lib/python3.5/dist-packages/torch/nn/functional.py", line 2879, in pad return torch._C._nn.reflection_pad2d(input, pad) RuntimeError: CUDA out of memory. Tried to allocate 130.00 MiB (GPU 0; 10.76 GiB total capacity; 9.68 GiB already allocated; 51.12 MiB free; 9.86 GiB reserved in total by PyTorch)

shoana3226 avatar Aug 02 '21 09:08 shoana3226