{ "cells": [ { "metadata": {}, "cell_type": "markdown", "source": "# Conversion from ONNX to TF Lite", "id": "4dc864ccc35bcf79" }, { "metadata": {}, "cell_type": "markdown", "source": "To convert an ONNX model to TF Lite using **ONNX2TFLite**, you only need to provide the input model and, optionally, specify the output path:", "id": "cdebcc90d8ba864e" }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": [ "output_model_path = Path(\"converted_model.tflite\")\n", "!onnx2tflite $model_path -o $output_model_path\n", "\n", "print(f\"Converted model saved to {output_model_path} file.\")" ], "id": "422f44549dc72a86" }, { "metadata": {}, "cell_type": "markdown", "source": "To list all configurable options, use the help command:", "id": "611a34d5ee4275c" }, { "metadata": {}, "cell_type": "code", "outputs": [], "execution_count": null, "source": "!onnx2tflite -h", "id": "41746bb51f39e783" } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 5 }