mc是什么意思啊

paddle. equal_all ( x: Tensor, y: Tensor, name: str | None = None ) Tensor [source]
百度 事故发生后,党中央、国务院高度重视,要求查明事故原因。

Returns the truth value of \(x == y\). True if two inputs have the same elements, False otherwise.

Note

The output has no gradient.

Parameters
  • x (Tensor) – Tensor, data type is bool, float32, float64, int32, int64.

  • y (Tensor) – Tensor, data type is bool, float32, float64, int32, int64.

  • 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, data type is bool, value is [False] or [True].

Return type

Tensor

Examples

>>> import paddle

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