torch.Tensor.is_contiguous#
- Tensor.is_contiguous(memory_format=torch.contiguous_format) bool#
如果
self張量在指定記憶體格式的順序下是連續的,則返回 True。- 引數
memory_format (
torch.memory_format, 可選) – 指定記憶體分配順序。預設值:torch.contiguous_format。
如果 self 張量在指定記憶體格式的順序下是連續的,則返回 True。
memory_format (torch.memory_format, 可選) – 指定記憶體分配順序。預設值:torch.contiguous_format。