{ "cells": [ { "cell_type": "markdown", "id": "4dc864ccc35bcf79", "metadata": {}, "source": [ "# Conversion from ONNX to TF Lite" ] }, { "cell_type": "markdown", "id": "cdebcc90d8ba864e", "metadata": {}, "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:" ] }, { "cell_type": "code", "execution_count": null, "id": "422f44549dc72a86", "metadata": {}, "outputs": [], "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.\")" ] }, { "cell_type": "markdown", "id": "611a34d5ee4275c", "metadata": {}, "source": [ "To list all configurable options, use the help command:" ] }, { "cell_type": "code", "execution_count": null, "id": "41746bb51f39e783", "metadata": {}, "outputs": [], "source": [ "!onnx2tflite -h" ] } ], "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 }