torch.Tensor.eq_(other)
paddle.Tensor.equal_(y)
其中,PyTorch 与 Paddle 的 other 参数所支持类型不一致,具体如下:
other
# PyTorch 写法 result = x.eq_(2) # Paddle 写法 result = x.equal_(paddle.to_tensor(2))