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