AssertionError: Torch not compiled with CUDA enabled
AssertionError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_18688/1973085970.py in
~\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
~\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