NVIDIA / vid2vid

Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.
Other
8.6k stars 1.2k forks source link

RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /pytorch/aten/src/THC/THCCachingHostAllocator.cpp:271 #19

Open moshifengyan opened 6 years ago

moshifengyan commented 6 years ago

Hello!After training the model,then i run the test_1024_g1.sh,it will throw the error!what's going on?

moshifengyan commented 6 years ago

process image... ['/home/daitian/vid2vid/datasets/Cityscapes/test_A/stuttgart_00/stuttgart_00_000000_000003_leftImg8bit.png'] THCudaCheck FAIL file=/pytorch/aten/src/THC/THCCachingHostAllocator.cpp line=271 error=77 : an illegal memory access was encountered Traceback (most recent call last): File "/home/daitian/vid2vid/test.py", line 43, in generated = model.inference(A, B, inst) File "/home/daitian/vid2vid/models/vid2vid_model_G.py", line 198, in inference fake_B = self.generate_frame_infer(real_A[self.n_scales-1-s], s) File "/home/daitian/vid2vid/models/vid2vid_model_G.py", line 218, in generate_frame_infer self.fake_B_prev[si] = torch.cat([self.fake_B_prev[si][1:,...], fake_B])
RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /pytorch/aten/src/THC/THCCachingHostAllocator.cpp:271

wangxiao5791509 commented 5 years ago

I meet the same problem with you @moshifengyan , although my code is not this project:

*** RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /opt/conda/conda-ld/pytorch_1535493744281/work/aten/src/THC/THCCachingHostAllocator.cpp:271

still do not know how to solve this issue. Do you have handled this successfully?

wangxiao5791509 commented 5 years ago

@moshifengyan I have soloved this issue. The reason that caused this problem in my case is I input a wrong tensor (the dimension and data it self is not right). Thanks.

Data-Designer commented 3 years ago

Nothing to help