All Projects → sseung0703 → Kd_methods_with_tf

sseung0703 / Kd_methods_with_tf

Licence: mit
Knowledge distillation methods implemented with Tensorflow (now there are 11 (+1) methods, and will be added more.)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Kd methods with tf

From Keras To C
A practical example of Tensorflow C API based deployment starting from a model trained with Tensorflow + Keras
Stars: ✭ 71 (-68.72%)
Mutual labels:  tensorflow-examples
Self Driving Car
Automated Driving in NFS using CNN.
Stars: ✭ 105 (-53.74%)
Mutual labels:  tensorflow-examples
Yolov3 Tf2
YoloV3 Implemented in Tensorflow 2.0
Stars: ✭ 2,327 (+925.11%)
Mutual labels:  tensorflow-examples
Eat tensorflow2 in 30 days
Tensorflow2.0 🍎🍊 is delicious, just eat it! 😋😋
Stars: ✭ 9,166 (+3937.89%)
Mutual labels:  tensorflow-examples
Androidtensorflowmachinelearningexample
Android TensorFlow MachineLearning Example (Building TensorFlow for Android)
Stars: ✭ 1,369 (+503.08%)
Mutual labels:  tensorflow-examples
Open nsfw android
🔥🔥🔥色情图片离线识别,基于TensorFlow实现。识别只需20ms,可断网测试,成功率99%,调用只要一行代码,从雅虎的开源项目open_nsfw移植,该模型文件可用于iOS、java、C++等平台
Stars: ✭ 1,586 (+598.68%)
Mutual labels:  tensorflow-examples
Math object detection
An image recognition/object detection model that detects handwritten digits and simple math operators. The output of the predicted objects (numbers & math operators) is then evaluated and solved.
Stars: ✭ 52 (-77.09%)
Mutual labels:  tensorflow-examples
Nakedtensor
Bare bone examples of machine learning in TensorFlow
Stars: ✭ 2,443 (+976.21%)
Mutual labels:  tensorflow-examples
Tensorflow2.0 Examples
🙄 Difficult algorithm, Simple code.
Stars: ✭ 1,397 (+515.42%)
Mutual labels:  tensorflow-examples
Tensorflow In Practice Code
源码实现:《TensorFlow实战》黄文坚,唐源 著
Stars: ✭ 176 (-22.47%)
Mutual labels:  tensorflow-examples
Free Tensorflow
Tensorflow 免费中文视频教程,开源代码,免费书籍.
Stars: ✭ 83 (-63.44%)
Mutual labels:  tensorflow-examples
Ml Classifier
A tool for quickly training image classifiers in the browser
Stars: ✭ 97 (-57.27%)
Mutual labels:  tensorflow-examples
Scisharp Stack Examples
Practical examples written in SciSharp's machine learning libraries
Stars: ✭ 136 (-40.09%)
Mutual labels:  tensorflow-examples
Tensorflow Brasil
Códigos e materiais sobre TensorFlow em Português
Stars: ✭ 74 (-67.4%)
Mutual labels:  tensorflow-examples
Kb Qa
基于知识库的中文问答系统(biLSTM)
Stars: ✭ 195 (-14.1%)
Mutual labels:  tensorflow-examples
Easypr Python
EasyPR-python
Stars: ✭ 55 (-75.77%)
Mutual labels:  tensorflow-examples
Chatgirl
ChatGirl is an AI ChatBot based on TensorFlow Seq2Seq Model. ChatGirl 一个基于 TensorFlow Seq2Seq 模型的聊天机器人。(包含预处理过的 twitter 英文数据集,训练,运行,工具代码,来波 Star 。)QQ群:167122861
Stars: ✭ 105 (-53.74%)
Mutual labels:  tensorflow-examples
Ml Classifier Ui
A UI tool for quickly training image classifiers in the browser
Stars: ✭ 224 (-1.32%)
Mutual labels:  tensorflow-examples
Cs224d
Code for Stanford CS224D: deep learning for natural language understanding
Stars: ✭ 222 (-2.2%)
Mutual labels:  tensorflow-examples
Machine Learning And Reinforcement Learning In Finance
Machine Learning and Reinforcement Learning in Finance New York University Tandon School of Engineering
Stars: ✭ 173 (-23.79%)
Mutual labels:  tensorflow-examples

Knowledge Distillation Methods with Tensorflow

Knowledge distillation is the method to enhance student network by teacher knowledge. So annually knowledge distillation methods have been proposed, but each paper's do experiments with different networks and compare with different methods. Moreover, each method is implemented by each author, so if a new researcher wants to study knowledge distillation, they have to find or implement all of the methods. Surely it is tough work. To reduce this burden, I publish some codes and modify from my research codes. I'll update the code and knowledge distillation algorithm, and all of the things will be implemented using Tensorflow.

Upgrade version of this Repo. will be available at this link

Implemented Knowledge Distillation Methods

Please check detail of each category in MHGD and If you think the above categorization is useful, please consider citing the following paper.

@inproceedings{GraphKD,
  title = {Graph-based Knowledge Distillation by Multi-head Attention Network},
  author = {Seunghyun Lee, Byung Cheol Song},
  booktitle = {British Machine Vision Conference (BMVC)},
  year = {2019}
}

Response-based Knowledge

Defined knowledge by the neural response of the hidden layer or the output layer of the network

Multi-connection Knowledge

Increase the quantity of knowledge by sensing several points of the teacher network

Shared-representation Knowledge

Defined knowledge by the shared representation between two feature maps

Relational Knowledge

Defined knowledge by intra-data relation

Experimental Results

The below table and plot are sample results using ResNet and train on CIFAR100.

I use the same hyper-parameter for training each network, and only tune hyper-parameter of each distillation algorithm. However the results may be not optimal. All of the numerical values and plots are averages of five trials.

Network architecture

The teacher network is ResNet32 and Student is ResNet8, and the student network is well-converged (not over and under-fit) for evaluating each distillation algorithm performance precisely. Note that implemented ResNet has doubled depth.

Training/Validation accuracy

Methods Last Accuracy Best Accuracy
Student 71.76 71.92
Teacher 78.96 79.08
Soft-logits 71.79 72.08
FitNet 72.74 72.96
AT 72.31 72.60
FSP 72.65 72.91
DML 73.27 73.47
KD-SVD 73.68 73.78
KD-EID 73.84 74.07
FT 73.35 73.50
AB 73.08 73.41
RKD 73.40 73.48
MHGD 73.98 74.30

Plan to do

  • Upgrade this Repo. to TF2.0. :)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].