greater_equal

paddle. greater_equal ( x, y, name=None ) [source]

This OP returns the truth value of \(x >= y\) elementwise, which is equivalent function to the overloaded operator >=.

NOTICE: The output of this OP has no gradient.

Parameters
  • x (Tensor) – First input to compare which is N-D tensor. The input data type should be float32, float64, int32, int64.

  • y (Tensor) – Second input to compare which is N-D tensor. The input data type should be float32, float64, int32, int64.

  • name (str, 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

The tensor storing the output, the output shape is same as input x.

Return type

Tensor, the output data type is bool

Examples

import paddle

x = paddle.to_tensor([1, 2, 3])
y = paddle.to_tensor([1, 3, 2])
result1 = paddle.greater_equal(x, y)
print(result1)  # result1 = [True False True]