GithubHelp home page GithubHelp logo

djzenma / raptor-soc-tflite-hello-world Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 47.02 MB

Tensorflow Lite Hello World project for Raptor SoC (efabless.com)

Starlark 2.96% C++ 65.30% C 0.73% Java 0.65% Shell 0.54% Objective-C 0.07% Objective-C++ 0.27% Jupyter Notebook 0.55% Python 28.73% Ruby 0.01% C# 0.01% Swift 0.04% Makefile 0.03% RobotFramework 0.01% NASL 0.01% Assembly 0.03% Pawn 0.02% PHP 0.01% Pascal 0.01% Smarty 0.03%

raptor-soc-tflite-hello-world's Introduction

Self Contained TFLite Hello World Project for Raptor (efabless)

This repo explains the intimitading TensorFlow repo and demonstrates TFLite on raptor by making it blinking.

How to Build

After cloning this repo and cd to it, run the following command:

make -f tensorflow/lite/micro/tools/make/Makefile TARGET=raptor hello_world_bin

Parameters:

  • -f tensorflow/lite/micro/tools/make/Makefile: the path to the Makefile.
  • TARGET: the target MCU, in this case raptor
  • hello_world_bin: the project name (hello_world) + the build type, and in this case we want the binary (bin)

Porting Any Platform to TFLite

The Tensorflow repo might seem intimitading when you are just starting to experiment with it. Therefore, I created this repo which is a simpler version of if while maintaining the original structure.

When writing TFLite project for MCUs, it is essential that you understand the following directories in TF:

  1. Start with the Hello World example and modify it as you want to make it fit your application purpose. It is found in the following path tensorflow/lite/micro/examples/hello_world
  2. If you have (and most probably you will) platform specific implementations (such as ADC data collection, DAC, UART, etc.) needed in the application, place these implementations in a subdirectory with the platform name inside the hello_world folder.
    example: hello_world/raptor/ contains the raptor version of output_handler.cc
  3. Provide your platform's implementation of the tensorflow/lite/micro/<platform_name>/debug_log.cc, here <platform_name> is raptor. This file provides a way to output debug information (for example using the UART).
  4. Write a Makefile for your platform and put it in: tensorflow/lite/micro/tools/make/targets/<platform_name>_makefile.inc For example, you will find raptor's Makefile in tensorflow/lite/micro/tools/make/targets/raptor_makefile.inc
  5. Finally, build using the command:
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=<platform_name> hello_world_bin

raptor-soc-tflite-hello-world's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

loesterfranco

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.