torch.Tensor.char
-
Tensor.char(memory_format=torch.preserve_format) → Tensor -
self.char()is equivalent toself.to(torch.int8). Seeto().- Параметры:
-
memory_format (
torch.memory_format, optional) – желаемый формат памяти возвращаемого тензора. По умолчанию:torch.preserve_format.
© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.Tensor.char.html