Skip to content

Exporting a specific function from a TFLite model to ONNX, instead of just the "default" one #2066

Open
@josephrocca

Description

@josephrocca

Describe the feature request

Currently it seems that if a TFLite file contains more than one function, it's only possible to convert one of them. Seems like it just converts the first function and ignores the rest, and there's no way to choose a different one as far as I can see. Here's an example tflite file that I'm working with here. If you open it in netron.app you can see it has two graphs - "encode" and "decode". When I export it, it only exports the "decode" graph. Here's a notebook showing the exporting process: https://colab.research.google.com/gist/josephrocca/3f3d940091c3a6e105155e4b77226487/notebook.ipynb

This request is related to this one, except that issue is asking for the ability to export multiple functions in a TF model to an ONNX file that has multiple functions. I don't need mutliple functions in my ONNX file, but I need to be able to export all the functions (separately, or together) into one or more ONNX files. Currently I can only get one of them, and there's no way to choose which one I get.

Describe scenario use case

Google recently released Lyra V2, but they only released the TFLite files, and it's uncertain whether they'll be able to release it in other model formats. So I'm trying to do my best to work with the models that they've given us. The end goal is to get Lyra V2 working on the web with ORT Web.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttfliteIssues related to TensorFlow Lite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions