Giter VIP home page Giter VIP logo

irg's Introduction

IRG for Knowledge Distillation

License

IRG is an open source implementation of the paper called "Knowledge Distillation via Instance Relationship Graph":

Yufan Liu, Jiajiong Cao, Bing Li, Chunfeng Yuan, Weiming Hu et al. Knowledge Distillation via Instance Relationship Graph. IEEE Conference on Computer Vision and Pattern Recognition (CVPR): Long Beach, USA. 2019.06.16-2019.06.20.

Abstract

The key challenge of knowledge distillation is to extract general, moderate and sufficient knowledge from a teacher network to guide a student network. In this paper, a novel Instance Relationship Graph (IRG) is proposed for knowledge distillation. It models three kinds of knowledge, including instance features, instance relationships and feature space transformation, while the latter two kinds of knowledge are neglected by previous methods. Firstly, the IRG is constructed to model the distilled knowledge of one network layer, by considering instance features and instance relationships as vertexes and edges respectively. Secondly, an IRG transformation is proposed to models the feature space transformation across layers. It is more moderate than directly mimicking the features at intermediate layers. Finally, hint loss functions are designed to force a student’s IRGs to mimic the structures of a teacher’s IRGs. The proposed method effectively captures the knowledge along the whole network via IRGs, and thus shows stable convergence and strong robustness to different network architectures. In addition, the proposed method shows superior performance over existing methods on datasets of various scales.

Citation

If you find IRG useful in your research, please cite our paper:

@inproceedings{liu2019knowledge,
  title={Knowledge Distillation via Instance Relationship Graph},
  author={Liu, Yufan and Cao, Jiajiong and Li, Bing and Yuan, Chunfeng and Hu, Weiming and Li, Yangxi and Duan, Yunqiang},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={7096--7104},
  year={2019}
}

Framework

Framework

Requirements

  • Caffe-windows

Usage

  1. Put *.cpp/*.hpp/*.cu files into corresponding directories of caffe.

  2. Compile caffe.

  make all -j 8
  1. Use prototxt files (e.g., IRG.prototxt) to train. IRG.prototxt is the train prototxt of single IRG (Teacher: ResNet20; Student: ResNet20-x0.5). IRG_Transformation.prototxt is the train prototxt of single IRG Transformation (Teacher: ResNet20; Student: ResNet20-x0.5). ResNet-20.prototxt is the original train prototxt of ResNet20.

Experiments

Experimental results

Contact

If any question, please contact [email protected], or use public issues section of this repository.

irg's People

Contributors

yufanliu avatar

Stargazers

Feng Chen avatar He Jiabei avatar Jiaqi Wang avatar Xin Dong avatar StyleTang avatar Shiyu Xuan avatar Silk_760 avatar  avatar IronMan avatar smiler avatar xh avatar qiuqiu avatar  avatar Shunyu Yao avatar  avatar zuijiang avatar  avatar Jianjie(JJ) Luo avatar LIU, Jinyang avatar  avatar Muhammad Sharif avatar  avatar Seunghyun Lee avatar Lei Liu avatar Fang Zhao avatar luzai avatar  avatar  avatar

Watchers

 avatar

irg's Issues

Which layers are used in IRG?

In .prototxt file, only the last pooling layer are used to create the instance relationships.
What's the setting in the experiment of the paper?

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.