torch.cpu.is_available
- torch.cpu.is_available()
Returns a bool indicating if CPU is currently available.
N.B. This function only exists to facilitate device-agnostic code
- Return type:
Returns a bool indicating if CPU is currently available.
N.B. This function only exists to facilitate device-agnostic code