評價此頁

torch.Tensor.pin_memory#

Tensor.pin_memory() Tensor#

如果張量尚未位於固定記憶體中,則將其複製到固定記憶體。預設情況下,固定記憶體所在的裝置是當前的 加速器