Shortcuts

torch.Tensor.is_set_to

Tensor.is_set_to(tensor) bool

如果两个张量指向完全相同的内存(相同的存储、偏移、大小和步幅),则返回True。

优云智算