Git Product home page Git Product logo

kd-base's Introduction

Knowledge Distillation

Introduction

Implementation of training various models with knowledge distillation.

Getting Started

0. Data prepare

  • Run jupyter notebooks located in dataprepare

1. train


2. test

Contribution Guide

  1. All models should be placed at ./models. They could be either separated py file or module directory, but they should be defined at ./models/__init__.py so that other program can call them without indicating their subdirectories.

  2. Two Dataloader mode exists and those can be switched by argument
    Extracting outputs from cumbersome model (1) on the fly, (2) on the memory\ So all cumbersome models should have method extract which can gets various arguments.
    extract_and_save.py call extract method from cumbersome pretrained model and save them.

  3. Model's initializing arguments should be defined at yaml config file. Same configuration file can be used at both extract_and_save.py and main.py

  4. Distillation use one model which contains both cumbersome and small model.
    Their parameters, pretrained path and all other options for initializing each of models are supplied by a yaml file.
    Those are implemented in ./models/kd.py

kd-base's People

Contributors

park323 avatar black-mold 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.