LukasMosser / PorousMediaGan

Reconstruction of three-dimensional porous media using generative adversarial neural networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ask for CPU

zllsasa opened this issue · comments

Sir:
I don't have a GPU, can you provide GAN programme in pytorch files based on CPU,or give me some ideas?
Thanks


AssertionError Traceback (most recent call last)
in ()
17 label.data.resize_(batch_size).fill_(real_label)
18
---> 19 output = netG(input)
20 errD_real = criterion(output, label)
21 errD_real.backward()

C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
487 result = self._slow_forward(*input, **kwargs)
488 else:
--> 489 result = self.forward(*input, **kwargs)
490 for hook in self._forward_hooks.values():
491 hook_result = hook(self, input, result)

~\PorousMediaGan\code\pytorch\dcgan.py in forward(self, input)
100 def forward(self, input):
101 gpu_ids = None
--> 102 if isinstance(input.data, torch.DoubleTensor) and self.ngpu > 1:
103 gpu_ids = range(self.ngpu)
104 return nn.parallel.data_parallel(self.main, input, gpu_ids)

C:\ProgramData\Anaconda3\lib\site-packages\torch\cuda_init_.py in _lazy_init()
159 raise RuntimeError(
160 "Cannot re-initialize CUDA in forked subprocess. " + msg)
--> 161 _check_driver()
162 torch._C._cuda_init()
163 _cudart = _load_cudart()

C:\ProgramData\Anaconda3\lib\site-packages\torch\cuda_init_.py in _check_driver()
89 Alternatively, go to: https://pytorch.org to install
90 a PyTorch version that has been compiled with your version
---> 91 of the CUDA driver.""".format(str(torch._C._cuda_getDriverVersion())))
92
93

Have you tried not instaling the cuda version of pytorch but rather the cpu version and then using the code?