yobx.litert.ops.reshape_ops#
Converters for TFLite shape / tensor-manipulation ops: RESHAPE, SQUEEZE, EXPAND_DIMS, TRANSPOSE, CONCATENATION, MEAN, SUM, REDUCE_MAX, REDUCE_MIN.
- yobx.litert.ops.reshape_ops.convert_concatenation(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
CONCATENATION→ ONNXConcat.
- yobx.litert.ops.reshape_ops.convert_expand_dims(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
EXPAND_DIMS→ ONNXUnsqueeze.The axis index comes from tensor input 1.
- yobx.litert.ops.reshape_ops.convert_mean(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
MEAN→ ONNXReduceMean.
- yobx.litert.ops.reshape_ops.convert_reduce_max(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
REDUCE_MAX→ ONNXReduceMax.
- yobx.litert.ops.reshape_ops.convert_reduce_min(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
REDUCE_MIN→ ONNXReduceMin.
- yobx.litert.ops.reshape_ops.convert_reshape(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
RESHAPE→ ONNXReshape.The target shape comes from tensor input 1 (an int32 1-D tensor).
- yobx.litert.ops.reshape_ops.convert_squeeze(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
SQUEEZE→ ONNXSqueeze.The axes to squeeze come from
builtin_options["squeeze_dims"]; if absent, squeeze all size-1 dims.
- yobx.litert.ops.reshape_ops.convert_sum(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
SUM→ ONNXReduceSum.
- yobx.litert.ops.reshape_ops.convert_transpose(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#
TFLite
TRANSPOSE→ ONNXTranspose.The permutation is stored as tensor input 1. We read it directly from the graph builder’s initializer map because ONNX
Transposerequires thepermattribute (not a runtime input).