Git Product home page Git Product logo

Comments (11)

DanieleParravicini-Synthara avatar DanieleParravicini-Synthara commented on June 28, 2024

it might be related to #619

from tflite-micro.

rascani avatar rascani commented on June 28, 2024

Thanks for filing the issue. This is indeed an interesting problem. The typical approach for using accelerators with tflite-micro has been to use a custom op. I'd recommend taking a look at the Ethos-U example in-tree, but the gist of it is to run an AOT tool that takes a TFLite model, identify which layers can be accelerated, and merge/replace those with an Ethos-U custom op that includes a command stream in the custom data payload. This approach does not require the model to be re-trained and looks at the model as a whole, so multiple layers may get combined into a single accelerated node.
As you point out, this does specialize the TFLite model for a given hardware and is no longer runnable on other devices.

While your option 2 addresses that, I think there might be a less invasive way to add extra information. The Model schema allows for Metadata to be specified. This is essentially a key-value store mapping strings to opaque data blobs. You could add an entry specific to the accelerator that encoded additional information. In your op implementation, you could then check for that metadata key and check for additional node information. Reference kernels would ignore this metadata. This approach would also allow you to describe it in whichever way would make sense for your accelerator, as opposed to having it annotated on every operator.

Does that help?

from tflite-micro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.