torch.Tensor.char Tensor.char(memory_format=torch.preserve_format) → Tensor self.char() is equivalent to self.to(torch.int8). See .