【TENSOR → ndarray】
TORCH.TENSOR.NUMPY
引数force が False(デフォルト)の場合、条件が揃えば 返された ndarray とテンソルはストレージを共有する
とのことです。
If force is False (the default), the conversion is performed only if the tensor is on the CPU, does not require grad, does not have its conjugate bit set, and is a dtype and layout that NumPy supports. The returned ndarray and the tensor will share their storage, so changes to the tensor will be reflected in the ndarray and vice versa.
【ndarray → TENSOR】
TORCH.FROM_NUMPY
返されたテンソルと ndarray は同じメモリを共有する
とのことです。
The returned tensor and ndarray share the same memory. Modifications to the tensor will be reflected in the ndarray and vice versa. The returned tensor is not resizable.