EEGNet icon indicating copy to clipboard operation
EEGNet copied to clipboard

AssertionError: Torch not compiled with CUDA enabled

Open ashwath1295 opened this issue 3 years ago • 0 comments

AssertionError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_18688/1973085970.py in 53 54 ---> 55 net = EEGNet().cuda(0) 56 print (net.forward(Variable(torch.Tensor(np.random.rand(1, 1, 120, 64)).cuda(0)))) 57 criterion = nn.BCELoss()

~\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py in cuda(self, device) 678 Module: self 679 """ --> 680 return self._apply(lambda t: t.cuda(device)) 681 682 def xpu(self: T, device: Optional[Union[int, device]] = None) -> T:

~\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py in _apply(self, fn) 568 def _apply(self, fn): 569 for module in self.children(): --> 570 module._apply(fn) 571 572 def compute_should_use_set_data(tensor, tensor_applied):

~\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py in _apply(self, fn) 591 # with torch.no_grad(): 592 with torch.no_grad(): --> 593 param_applied = fn(param) 594 should_use_set_data = compute_should_use_set_data(param, param_applied) 595 if should_use_set_data:

~\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py in (t) 678 Module: self 679 """ --> 680 return self._apply(lambda t: t.cuda(device)) 681 682 def xpu(self: T, device: Optional[Union[int, device]] = None) -> T:

~\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\cuda_init_.py in _lazy_init() 206 "multiprocessing, you must use the 'spawn' start method") 207 if not hasattr(torch._C, '_cuda_getDeviceCount'): --> 208 raise AssertionError("Torch not compiled with CUDA enabled") 209 if _cudart is None: 210 raise AssertionError(

AssertionError: Torch not compiled with CUDA enabled

ashwath1295 avatar Feb 24 '22 09:02 ashwath1295