torch.Tensor.byte
-
Tensor.byte(memory_format=torch.preserve_format) → Tensor -
self.byte()эквивалентноself.to(torch.uint8). См.to().- Параметры:
-
memory_format (
torch.memory_format, необязательно) – желаемый формат памяти возвращаемого тензора. По умолчанию:torch.preserve_format.
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/1.13/generated/torch.Tensor.byte.html