Skip to content

eloquentarduino/tinymlgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyML gen

This is a simple package to export a model trained in Tensorflow Lite to a plain C array, ready to be used for inference on microcontrollers.

Install

pip install tinymlgen

Use

from tinymlgen import port

if __name__ == '__main__':
    tf_model = create_tf_model()
    c_code = port(tf_model)

Configuration

You can pass a few parameters to the port function:

  • optimize (=True): apply optimizers to the exported model. Can either be a list of optimizers or a boolean, in which case OPTIMIZE_FOR_SIZE is applied
  • variable_name (='model_data'): give the exported array a custom name
  • pretty_print (=False): print the array in a nicely formatted arrangement

About

Generate C code for microcontrollers from Tensorflow models

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy