Shortcuts

torch.Tensor.is_contiguous

Tensor.is_contiguous(memory_format=torch.contiguous_format) bool

如果 self 张量在内存中是连续的,并且符合指定的内存格式,则返回 True。

Parameters

memory_format (torch.memory_format, 可选) – 指定内存分配顺序。默认值: torch.contiguous_format

优云智算