Skip to main content

function

greater

greater(lhs: Symbol, rhs: Symbol) -> Symbol

Computes the elementwise greater than comparison between two symbolic tensors.

Creates a new op node to compute the greater than comparison of two symbol tensor values and adds it to the graph, returning the symbolic result.

  • If lhs and rhs have different dtypes, they will be promoted according to the dtype promotion rules before the operation.
  • If lhs and rhs have different shapes, they will be broadcast to the same shape according to broadcasting rules before the operation.

Args:

  • lhs (Symbol): The symbol to use as left side of the greater than comparison.
  • rhs (Symbol): The symbol to use as right side of the greater than comparison.

Returns:

A symbolic tensor value representing the output of the greater than comparison. The result will have: - element type bool, true if the left-hand-side value at a given position is strictly greater than (not equal to) the right-hand-side at that same position, and false otherwise. - the same shape as the broadcast of the two input shapes.

Raises:

  • If the input values' shapes are not compatible for broadcasting. See _elementwise_broadcast() for more. - If one of the input values has an unsupported dtype. - If the two symbols are parts of different graphs.