Tensor.byte
- Tensor.byte(memory_format=torch.preserve_format) Tensor
self.byte()
等价于self.to(torch.uint8)
。请参阅to()
。- 参数
memory_format (
torch.memory_format
, optional) – 返回张量的期望内存格式。默认值:torch.preserve_format
。
self.byte()
等价于 self.to(torch.uint8)
。请参阅 to()
。
memory_format (torch.memory_format
, optional) – 返回张量的期望内存格式。默认值:torch.preserve_format
。