Closed kambiannan closed 1 year ago
If you are getting this error raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled
raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled
20c20 < self.mean = torch.from_numpy(self.mean).float().cuda() --- > self.mean = torch.from_numpy(self.mean).float().to(torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')) 24c24 < self.std = torch.from_numpy(self.std).float().cuda() --- > self.std = torch.from_numpy(self.std).float().to(torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')) 52c52 < device = torch.device("cuda:0") --- > device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') 60c60 < netArc_checkpoint = torch.load(netArc_checkpoint) --- > netArc_checkpoint = torch.load(netArc_checkpoint) if torch.cuda.is_available() else torch.load(netArc_checkpoint, map_location=torch.device('cpu'))
Attaching file. Just put in models. fs_model.py.zip
any other issues, reply here. I can try to assist
If you are getting this error
raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled
Attaching file. Just put in models. fs_model.py.zip