torch.Tensor.byte¶
- Tensor.byte(memory_format=torch.preserve_format) Tensor¶
self.byte()等同於self.to(torch.uint8)。參見to()。- 引數
memory_format (
torch.memory_format, optional) – 返回 Tensor 的期望記憶體格式。預設值:torch.preserve_format。
self.byte() 等同於 self.to(torch.uint8)。參見 to()。
memory_format (torch.memory_format, optional) – 返回 Tensor 的期望記憶體格式。預設值: torch.preserve_format。