Git Product home page Git Product logo

knowledge-distillation-in-nn's Introduction

Knowledge-Distillation-in-NN

Knowledge-Distillation(KD) is a simple way to compress model while keeping the performance of original model. This repository provide a implementation of the paper "Distilling the Knowledge in a Neural Network" with some changes. Please check the references for detailed explanations.

Requirements

  • python 3.6 >
  • pytorch 1.3 >

Structure

.
|--experiments (it will include the scripts to run, results of train and test)
|--train_net.py (main solver to train the model)
|--data/
|    |--data_loader.py (Data queue module)
|--models/
|    |--Loss.py (Loss functions that are used in this project)
|--engine/
|    |--trainer.py
|    |--inference.py
|    |--solver.py
|--utils/
|    |--logger.py (module that can visualization of image and training plot)  
|    |--checkpointer.py
|    |--measure.py

You should make clear that all directory and files are located correctly

TODO

  • Check all requirements to run
  • Additional feature to improve baseline(Hinton's 15)
  • Train teachers

Usage

I added two scripts. One for training the teacher model and another for trainingthe student using teacher.
Specify your teacher model in models and build_model if you have own your model and put arguments correctly to run.

How to train?

$ ./experiments/exp1/train.sh

How to test?

Performance

Table will be appear

To track your training progress

$ tensorboard --logdir=experiment/ --port=6666

and go to 'localhost:6666' on webbrowser. You can see the accuracy and loss graph

References

knowledge-distillation-in-nn's People

Contributors

jeong-tae avatar jtlee90 avatar

Stargazers

IronMan avatar pengpeng avatar Adrià avatar  avatar

Watchers

James Cloos avatar  avatar paper2code - bot 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.