評價此頁

torch.Tensor.is_set_to#

Tensor.is_set_to(tensor) bool#

如果兩個張量指向完全相同的記憶體(相同的 storage、offset、size 和 stride),則返回 True。