torch.equal¶ torch.equal(input, other) → bool¶ True 如果两个张量具有相同的大小和元素,False 否则。 示例: >>> torch.equal(torch.tensor([1, 2]), torch.tensor([1, 2])) 真