torch.Tensor.char ¬
- Tensor.char(内存格式=torch.preserve_format) → Tensor ¬
self.char()
等价于self.to(torch.int8)
。参见to()
。- 参数:
返回张量的期望内存格式(
torch.memory_format
,可选)- 默认:torch.preserve_format
。
self.char()
等价于 self.to(torch.int8)
。参见 to()
。
返回张量的期望内存格式( torch.memory_format
,可选)- 默认: torch.preserve_format
。