一个模块化的,配置驱动的知识提炼框架。提供经过训练的模型、训练日志和配置,以确保再现性。
torchdistill的Python项目详细描述
torchdistill:一个模块化的、配置驱动的知识提取框架
torchdistill(以前是kdkit)提供各种知识提炼方法 并使您能够通过编辑yaml文件而不是Python代码来设计(新)实验。 即使你需要在教师/学生模型中提取中间表示, 您将NOT需要重新实现模型,这些模型通常会更改转发的接口, 而是在yaml文件中指定模块路径。在
前钩管理器
使用ForwardHookManager,您可以在模型中提取中间表示,而无需修改其转发函数的接口。
This example notebook将使您更好地了解用法。在
ILSVRC 2012(ImageNet)前1验证精度
T: ResNet-34* | Pretrained | KD | AT | FT | CRD | Tf-KD | SSKD | L2 | PAD-L2 |
---|---|---|---|---|---|---|---|---|---|
S: ResNet-18 | 69.76* | 71.37 | 70.90 | 70.45 | 70.93 | 70.52 | 70.09 | 71.08 | 71.71 |
Original work | N/A | N/A | 70.70 | N/A** | 71.17 | 70.42 | 71.62 | 70.90 | 71.71 |
*预训练的ResNet-34和ResNet-18由torchvision提供。
**在原始工作中,FT与ILSVRC 2015一起评估。
对于第二行(S:ResNet-18),检查点(训练权重)、配置和日志文件是available,
配置重用了除KD外的原始工作中使用的历元数等超参数。
图像分类、对象检测和语义分割的示例代码可在examples/中找到。在
引文
[Preprint]
@article{matsubara2020torchdistill,title={torchdistill: A Modular, Configuration-Driven Framework for Knowledge Distillation},author={Matsubara, Yoshitomo},year={2020}eprint={2011.12913},archivePrefix={arXiv},primaryClass={cs.LG}}
如何设置
- Python 3.6>;=
- pipenv(可选)
由pip/pipenv安装
^{pr2}$从此存储库安装
git clone https://github.com/yoshitomo-matsubara/torchdistill.git
cd torchdistill/
pip3 install -e .
# or use pipenv
pipenv install "-e ."
问题/联系人
文件正在编制中。同时,如果您有功能请求或 如果你想私下问我,请给我发邮件(yoshitom@uci.edu)。在
参考文献
- :mag:pytorch/vision/references/classification/
- :mag:pytorch/vision/references/detection/
- :mag:pytorch/vision/references/segmentation/
- :mag:杰弗里·辛顿,奥利尔·温尼尔斯和杰夫·迪恩。"Distilling the Knowledge in a Neural Network"(深度学习和表征学习研讨会:NeurIPS 2014)
- :mag:阿德里亚娜·罗梅罗、尼古拉斯·巴拉斯、萨米拉·易卜拉希米·卡胡、安托万·查桑、卡洛·加塔和约书亚·本吉奥。"FitNets: Hints for Thin Deep Nets"(ICLR 2015)
- :mag:叶俊浩、董玉珠、吉勋贝和金俊莫。"A Gift From Knowledge Distillation: Fast Optimization, Network Minimization and Transfer Learning"(CVPR 2017)
- :mag:谢尔盖·扎戈鲁伊科和尼科斯·科莫达基斯。"Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer"(ICLR 2017)
- :mag:尼古拉·帕萨利斯和阿纳斯塔西奥斯特法斯。"Learning Deep Representations with Probabilistic Knowledge Transfer"(ECCV2018)
- :mag:金章浩,宋屋公园和郭家俊。"Paraphrasing Complex Network: Network Compression via Factor Transfer"(NeurIPS 2018)
- :mag:裴勇浩,李明斯克,桑多云和崔金英。"Knowledge Transfer via Distillation of Activation Boundaries Formed by Hidden Neurons"(AAAI 2019)
- :mag:旺比公园、金东居、吕彦璐和赵敏洙。"Relational Knowledge Distillation"(CVPR 2019)
- :mag:安成洙、许虎壳牌、达米诺、劳伦斯、戴振文。"Variational Information Distillation for Knowledge Transfer"(CVPR 2019)
- :mag:吉托莫松巴拉、萨布尔·拜迪亚、戴维德·卡莱加罗、马可·莱沃拉托和萨米尔·辛格。"Distilled Split Deep Neural Networks for Edge-Assisted Real-Time Systems"(视频分析和智能边缘热点专题研讨会:MobiCom 2019)
- :mag:彭宝云、小金、刘佳恒、李东生、吴一超、刘宇、周顺峰、张昭宁。"Correlation Congruence for Knowledge Distillation"(ICCV 2019)
- :mag:董建华和莫里。"Similarity-Preserving Knowledge Distillation"(ICCV 2019)
- :mag:田永龙、克里希南和菲利普·伊索拉。"Contrastive Representation Distillation"(ICLR 2020)
- :mag:吉托莫·松巴拉和马可·莱沃拉托。"Neural Compression and Filtering for Edge-assisted Real-time Object Detection in Challenged Networks"(ICPR 2020)
- :mag:李媛、戴永华、李桂林、王涛、冯嘉时。"Revisiting Knowledge Distillation via Label Smoothing Regularization"(CVPR 2020)
- ^(徐晓伟,刘晓伟,刘晓薇,43)。"Knowledge Distillation Meets Self-Supervision"(ECCV 2020)
- :mag:张友才、蓝忠浩、戴玉晨、曾芳高、白燕、张杰、魏宜晨。"Prime-Aware Adaptive Distillation"(ECCV 2020)
- 项目
标签: