Code Monkey home page Code Monkey logo

lib_tflite_micro's Introduction

TFLite-micro container

This repo is a wrapper for lib_tflite_micro. This repo contains all third party repos that are needed to use tflite-micro on an XCORE. It wraps this third-party C++ software up in a library that exposes three interfaces:

  1. A C interface for use on embedded systems (lib_tflite_micro).
  2. A command line interface for use on a host (host_command_line_interface)

The lib_tflite_micro library depends on lib_nn.

It provides the following services:

  • lib_tflite_micro/module_build_info: file that allows lib_tflite_micro to be integrated into normal XMOS build flow
  • lib_tflite_micro/src: a function that wraps the C++ interpreter in C (inference_engine.cc), and a collection of kernels that we add to tflite-micro with XCORE specific operators
  • lib_tflite_micro/api: .h files for the above
  • host_cmd_line_interpeter: a command line wrapper for XTFLM, enabling it to be used over the command line.

C interface

It exposes a C interface comprising a datastructure (inference_engine_t) with a few functions that can be used to initialise the structure and/or

Getting the XCORE.AI optimiser

You can get the XCORE.AI optimiser through pypi:

This gets you both a command line interface and python interface to the xcore-opt tool that optimises a .tflite file for xcore perform an inference. The data structure itself can be used to directly read/write data into tensors, this enables sensors to directly operate in the tensor space.

The C interface can be used with the standard XMOS build system, and is built from the appropriate application directory

Command line interface

The command line interface uses the C interface above and makes it accessible from the command line, enabling the end user to send data through a TFLite model using the XTFLM interpreter. The XTFLM intepreter will have XCORE specific operators (such as 2D convolutions, loading from flash) that are emulated on the host.

The command line interface is built by invoking make install at top level or inside host_command_line_interface.

The command line interface cane be tested by invoking make test at either level.

lib_tflite_micro's People

Contributors

alexandracraciun avatar andrewdewhurst avatar andrewstanfordjason avatar aranxmos avatar henkmuller avatar keithm-xmos avatar panickal-xmos avatar scott-xmos avatar

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.