Skip to main content

function

select

select(condition: Symbol, x: Symbol, y: Symbol) -> Symbol

Returns condition ? x : y (element-wise), where cond, x and y are input tensors.

Args:

  • condition (Symbol): The condition tensor to use for selecting elementwise values.
  • x (Symbol): If the condition is true at a position, the value from the same position in this tensor will be selected.
  • y (Symbol): If the condition is false at a position, the value from the same position in this tensor will be selected.

Returns:

A new symbolic tensor holding either values from either x or y, based on the elements in condition.