yobx.tensorflow.ops.element_wise#
Converters for element-wise TF ops: AddV2, BiasAdd, ConcatV2,
SelectV2.
Addition / bias#
AddV2, BiasAdd
Concatenation#
ConcatV2
Conditional selection#
SelectV2
- yobx.tensorflow.ops.element_wise.convert_concat_v2(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#
Converts TF
ConcatV2→ ONNXConcat.TF
ConcatV2takes N tensor inputs followed by a scalaraxisconstant as the last input. The axis value is read from that constant and forwarded as theaxisattribute of the ONNXConcatnode.
- yobx.tensorflow.ops.element_wise.convert_element_wise(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#
Converts TF element-wise addition ops (
AddV2,BiasAdd) to ONNXAdd.TF’s
BiasAddis semantically equivalent to adding a 1-D bias along the last dimension of the input, which maps directly to ONNXAddwith numpy-style broadcasting.
- yobx.tensorflow.ops.element_wise.convert_select_v2(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#
Converts TF
SelectV2(tf.where(condition, x, y)) → ONNXWhere.SelectV2selects elements from x where condition isTrueand from y otherwise. Broadcasting semantics match ONNXWhere.