We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get_device
1 parent a893f51 commit 8da4d5bCopy full SHA for 8da4d5b
alibi_detect/utils/pytorch/misc.py
@@ -89,5 +89,6 @@ def get_device(device: Optional[Union[str, torch.device]] = None) -> torch.devic
89
logger.warning('No GPU detected, fall back on CPU.')
90
else:
91
torch_device = torch.device('cpu')
92
- logger.warning('Requested device not recognised, fall back on CPU.')
+ if device.lower() != 'cpu':
93
+ logger.warning('Requested device not recognised, fall back on CPU.')
94
return torch_device
0 commit comments