yobx.tensorflow.ops.math_ops#

Converters for miscellaneous TF math ops.

Argument reduction#

ArgMax, ArgMin

Top-K#

TopKV2

Predicate / classification#

IsNan, IsInf, IsFinite

yobx.tensorflow.ops.math_ops.convert_argmax(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#

TF ArgMax (tf.math.argmax) → ONNX ArgMax.

yobx.tensorflow.ops.math_ops.convert_argmin(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#

TF ArgMin (tf.math.argmin) → ONNX ArgMin.

yobx.tensorflow.ops.math_ops.convert_isfinite(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#

TF IsFinite (tf.math.is_finite) → ONNX Not(Or(IsNaN(x), IsInf(x))).

yobx.tensorflow.ops.math_ops.convert_isinf(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#

TF IsInf (tf.math.is_inf) → ONNX IsInf.

yobx.tensorflow.ops.math_ops.convert_isnan(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#

TF IsNan (tf.math.is_nan) → ONNX IsNaN.

yobx.tensorflow.ops.math_ops.convert_topk(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: Operation) str[source]#

TF TopKV2 (tf.math.top_k) → ONNX TopK.

ONNX TopK requires K to be a 1-D int64 tensor; TF passes it as a 0-D int32 scalar, so we cast and reshape before forwarding.