Closed dearleiii closed 6 years ago
Decrease model size, s.t convolutional layers,/ Ndf ect.
device = torch.device("cuda:0") gpu_list = list(range(0, torch.cuda.device_count()))
approximator = APXM_edsr() approximator = torch.nn.DataParallel(approximator) approximator.to(device) print(approximator)
leichen@gpu-compute1$ python3 scatter_edsr.py THCudaCheck FAIL file=/pytorch/aten/src/THC/generic/THCStorage.cu line=58 error=2 : out of memory Traceback (most recent call last): File "scatter_edsr.py", line 45, in
approximator.to(device)
File "/home/home2/leichen/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 393, in to
return self._apply(lambda t: t.to(device))
File "/home/home2/leichen/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/home/home2/leichen/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/home/home2/leichen/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/home/home2/leichen/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 182, in _apply
param.data = fn(param.data)
File "/home/home2/leichen/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 393, in
return self._apply(lambda t: t.to(device))
RuntimeError: cuda runtime error (2) : out of memory at /pytorch/aten/src/THC/generic/THCStorage.cu:58
leichen@gpu-compute1$ emacs scatter_edsr.py