torch.Tensor.cpu¶
- Tensor.cpu(memory_format=torch.preserve_format) Tensor¶
返回此物件在 CPU 記憶體中的副本。
如果此物件已在 CPU 記憶體中,則不執行復制並返回原物件。
- 引數
memory_format (
torch.memory_format, 可選) – 返回 Tensor 期望的記憶體格式。 預設值:torch.preserve_format。
返回此物件在 CPU 記憶體中的副本。
如果此物件已在 CPU 記憶體中,則不執行復制並返回原物件。
memory_format (torch.memory_format, 可選) – 返回 Tensor 期望的記憶體格式。 預設值:torch.preserve_format。