This module takes a trained Keras neural network and compiles it to fit a MCU. The compiling is done in two parts: first the model is compiled into a Tensorflow Lite model and then it is converted into a C-array, that can be used by Arduino Nano
plot_size
plot_size (model_path)
Plots the size difference before and after quantization Args: model_path
: Path to model files Returns: pandas dataframe: Pandas dataframe containing information
convert_model_to_cc
convert_model_to_cc (model_path:str)
Creates model.cc from model.tflite in folder model_path
convert_to_c_array
convert_to_c_array (bytes)
C array conversion
convert_model
convert_model (model_path:str, output_path:str, dataset_path:str, model_params:dict, model_name:str)
Model conversion into TFLite model Args: