今日头条新闻男子只为几个玉米杆 被判3年赔偿

paddle. equal ( x: Tensor, y: Tensor, name: str | None = None ) Tensor [source]
百度 会议议程审议国家安全法草案、刑法修正案(九)草案、大气污染防治法修订草案;审议全国人大常委会委员长会议关于提请审议网络安全法草案的议案、关于提请审议全国人大常委会关于实行宪法宣誓制度的决定草案的议案;审议最高人民检察院关于提请审议关于授权最高人民检察院在部分地区开展公益诉讼改革试点工作的决定草案的议案;审议国务院关于提请审议批准《成立新开发银行的协议》《中华人民共和国和哈萨克斯坦共和国关于移管被判刑人的条约》《多边税收征管互助公约》的议案;审议全国人大常委会执法检查组关于检查职业教育法实施情况的报告;

This layer returns the truth value of \(x == y\) elementwise.

Note

The output has no gradient.

Parameters
  • x (Tensor) – Tensor, data type is bool, float16, float32, float64, uint8, int8, int16, int32, int64, complex64, complex128.

  • y (Tensor) – Tensor, data type is bool, float16, float32, float64, uint8, int8, int16, int32, int64, complex64, complex128.

  • name (str|None, optional) – The default value is None. Normally there is no need for user to set this property. For more information, please refer to Name.

Returns

output Tensor, it’s shape is the same as the input’s Tensor, and the data type is bool. The result of this op is stop_gradient.

Return type

Tensor

Examples

>>> import paddle

>>> x = paddle.to_tensor([1, 2, 3])
>>> y = paddle.to_tensor([1, 3, 2])
>>> result1 = paddle.equal(x, y)
>>> print(result1)
Tensor(shape=[3], dtype=bool, place=Place(cpu), stop_gradient=True,
[True , False, False])