Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 911 Bytes

not_equal_cn.rst

File metadata and controls

29 lines (18 loc) · 911 Bytes

not_equal

返回 x! = y 逐元素比较 x 和 y 是否相等,相同位置的元素不相同则返回 True,否则返回 False。使用重载算子 != 可以有相同的计算函数效果。

Note

输出的结果不返回梯度。

参数

  • x (Tensor) - 输入 Tensor,支持的数据类型包括 bool、float32、float64、uint8、int8、int16、int32、int64。
  • y (Tensor) - 输入 Tensor,支持的数据类型包括 bool、float32、float64、uint8、int8、int16、int32、int64。
  • name (str,可选) - 具体用法请参见 api_guide_Name,一般无需设置,默认值为 None。

返回

Tensor,shape 和输入一致,数据类型为 bool。

代码示例

COPY-FROM: paddle.not_equal