yobx.litert.ops.activations#

Converters for TFLite activation ops: RELU, TANH, LOGISTIC, ELU, LEAKY_RELU.

yobx.litert.ops.activations.convert_elu(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite ELU → ONNX Elu(alpha=1.0).

yobx.litert.ops.activations.convert_gelu(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite GELU → ONNX Gelu.

yobx.litert.ops.activations.convert_hard_swish(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite HARD_SWISH → ONNX HardSwish.

yobx.litert.ops.activations.convert_leaky_relu(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite LEAKY_RELU → ONNX LeakyRelu.

yobx.litert.ops.activations.convert_log_softmax(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite LOG_SOFTMAX → ONNX LogSoftmax(axis=-1).

yobx.litert.ops.activations.convert_relu(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite RELU → ONNX Relu.

yobx.litert.ops.activations.convert_relu_n1_to1(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite RELU_N1_TO_1 → ONNX Clip(min=-1, max=1).

yobx.litert.ops.activations.convert_softmax(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite SOFTMAX → ONNX Softmax(axis=-1).

yobx.litert.ops.activations.convert_tanh(g: GraphBuilderExtendedProtocol, sts: Dict[str, Any], outputs: List[str], op: TFLiteOperator) str[source]#

TFLite TANH → ONNX Tanh.