Code Monkey home page Code Monkey logo

thesis-tinyml's Introduction

Multi-objective optimization of Audio Processing DNNs on Embedded Hardware

Description:

As part of this master thesis, the following investigations need to be carried out.

  • Get familiar with the state-of-the-art models for the two audio process- ing applications.
  • Utilize existing optimization techniques with the audio processing ap- plications.
  • Select the methods that are deployable on the available embedded hardware.
  • Develop a hardware-aware multi-objective optimization flow.
  • Target a specific objective for innovation or competition with the state- of-the-art.

How to get started with the baseline

First you have to setup the required environment (Download dcase20 dataset):

python -m venv envs/torch
source envs/torch/bin/activate
pip install -r requirements.txt
./dcase.sh
export CUBLAS_WORKSPACE_CONFIG=:16:8

After that everything should be setup to run tests:

pytest src/*

Now you can run the baseline for several audio processing application:

python src/main.py

Set --config-name=asc3 or sc for different applications. Take a look inside YAML files to see possible configurations.

Pruning

You can run lottery ticket experiments or training with iterative pruning:

python src/main.py apply=lottery
python src/main.py apply=itr-prune

Or you can just prune a pretrained model:

python src/main.py apply=prune model_dir=path/to/model/state

Quantization

Setup the required environment for NEMO:

python -m venv envs/nemo
source envs/nemo/bin/activate
pip install -r requirements-nemo.txt

You can post-training quantization and fine-tuning with NEMO or Nvidia:

python src/main.py model.quant=nemo model_dir=path/to/model/state optim=sgd-steplr optim.optim.lr=0.001 n_epochs=5
python src/main.py model.quant=nvidia model_dir=path/to/model/state optim=sgd-steplr optim.optim.lr=0.001 n_epochs=5

Or you can run quantization-aware-training with Brevitas(Currently only for SC):

python src/main.py --config-name=sc model.quant=brevitas

Knowledge distillation

python src/main.py --config-name=sc tmodel=vgg19 tmodel_dir=/path/to/teacher/state model_dir=/path/to/student/state optim.optim.lr=0.001

Testing

You can test a pre-trained network:

python src/main.py apply=test model_dir=path/to/model/state

Resources

Compression techniques

thesis-tinyml's People

Contributors

berab avatar

Stargazers

 avatar

Watchers

 avatar

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.