/tflm_tinylstm

tflm instantiation for tinylstm

Primary LanguageCApache License 2.0Apache-2.0

TFLM_TINY_LSTM

This repo test TFLM on TinyLstm model for Apollo4. There are 5 layers including 2 LSTM layers and 3 FC layers. However, we adjust the model size (around 130kB) to fit current hardware restriction. Both activation and weight tables are in 8-bit.

  • evb/src/quant_model_act.h: TFLM header file generated by tflite
  • python/model_tflite/model.tflite: .tflite model

Directory contents

tflm_tinylstm/ # root 
    evb/ # for evb deployment
        build/      # bin files
        includes/   # required inlcudes
        libs/       # required libs
        make/       # make.mk
        pack/
        src/        # c source codes
        Makfile
        autogen.mk
    ns-nnsp/  # c codes to build nnsp library (used only when re-building library)
    python/   # for NN training
    README.md # this readme

Prerequisite

Software

To work on Apollo4, you need

  • Arm GNU Toolchain 11.3
  • Segger J-Link v7.56+

Compiling and Running a Pre-Trained Model

Plain EVB:

From the nnsp/evb/ directory:

  1. make clean
  2. make
  3. make deploy Ensure your board is connected via the JLINK USB port and turned on first.