快捷方式

torch.Tensor.is_contiguous

Tensor.is_contiguous(memory_format=torch.contiguous_format) bool

如果 self 張量在記憶體中按照指定的記憶體格式順序是連續的,則返回 True。

引數

memory_format (torch.memory_format, 可選) – 指定記憶體分配順序。預設值: torch.contiguous_format

文件

查閱 PyTorch 全面的開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源