Skip to content

Alex-Delaveau/TFLite-Optimize-Bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFLite Model Optimization and Benchmarking Application

This application is designed to convert Keras models to TensorFlow Lite (TFLite) models using quantization and to benchmark multiple models.

App Architecture

Directory Structure

  • Benchmarks/: Contains all the code used for benchmarking models.

  • Quantization_tools/: Contains the code to perform quantization on models.

  • Models/: Contains the models you want to convert or quantize. Each model directory must follow the implementation examples (e.g., Mnist or CloudNet).

    • Each model directory should include a run.py script with a class representing your model that extends BaseModel. This class must have convert and benchmark functions to handle conversion to TFLite and benchmarking, respectively.

Main Script

  • run_model.py: The main script of the application used to launch the processes.
    • Usage: python run_model.py {model_name} {action}
      • {model_name}: The name of the model directory (e.g., mnist).
      • {action}: The action to perform (benchmark or convert).

Usage Example

To start the benchmark function for the MNIST model, run:

python run_model.py mnist benchmark

Getting Started

  1. Clone the repository:

    git clone https://github.com/Alex-Delaveau/TFLite-Optimize-Bench.git
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. (Optional) If you want to work on the CloudNet model, install its specific dependencies:

    pip install -r models/cloudnet/requirements.txt
  4. Run the desired model and action:

    python run_model.py {model_name} {action}

Replace {model_name} with the name of your model (e.g., mnist) and {action} with the desired action (benchmark or convert).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages