| 8-bit integer (unsigned) |  torch.uint8 | torch.*.ByteTensor
| 8-bit integer (signed) | torch.int8 | torch.*.CharTensor
| 16-bit integer (signed) | torch.int16 or torch.short | torch.*.ShortTensor
| 32-bit integer (signed) | torch.int32 or torch.int | torch.*.IntTensor
| 64-bit integer (signed) | torch.int64 or torch.long | torch.*.LongTensor
The dtype of a tensor can be access via its dtype attribute.
torch.device
A torch.device contains a device type ('cpu' or 'cuda') and optional device ordinal (id) for the device type. It can be initialized with torch.device('{device_type}') or torch.device('{device_type}:{device_ordinal}').