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