Select

Versioned name: Select-1

Category: Conditions

Short description: Select returns a tensor filled with the elements from the second or the third inputs, depending on the condition (the first input) value.

Detailed description

Select takes elements from then input tensor or the else input tensor based on a condition mask provided in the first input cond. Before performing selection, input tensors then and else are broadcasted to each other if their shapes are different and auto_broadcast attributes is not none. Then the cond tensor is one-way broadcasted to the resulting shape of broadcasted then and else. Broadcasting is performed according to auto_broadcast value.

Attributes

Inputs:

Outputs:

Example

<layer ... type="Select">
<input>
<port id="0">
<dim>3</dim>
<dim>2</dim>
</port>
<port id="1">
<dim>3</dim>
<dim>2</dim>
</port>
<port id="2">
<dim>3</dim>
<dim>2</dim>
</port>
</input>
<output>
<port id="1">
<dim>3</dim>
<dim>2</dim>
</port>
</output>
</layer>