Code Monkey home page Code Monkey logo

Comments (7)

jiaxiang-wu avatar jiaxiang-wu commented on August 20, 2024

They only share the same architecture, but not model weights due to different initialization. In practice, training a full-precision learner with distillation loss can indeed improve the performance. Below is a comparison on the classification accuracy of models trained with or without distillation loss, on CIFAR-10:

Model Distillation? Accuracy Improvement
ResNet-20 91.93%
ResNet-20 + 93.10% 1.07%
ResNet-32 92.59%
ResNet-32 + 93.44% 0.85%
ResNet-44 92.76%
ResNet-44 + 93.71% 0.95%
ResNet-56 93.23%
ResNet-56 + 94.01% 0.78%

from pocketflow.

as754770178 avatar as754770178 commented on August 20, 2024

OK, thanks

from pocketflow.

as754770178 avatar as754770178 commented on August 20, 2024

The distill result is well when I distill model in small dataset, but when I distill resnet_v1_50 in ImageNet, the result is not good. The top-5 of teacher model is 92.7% , but top-5 of student model is 92%.

from pocketflow.

jiaxiang-wu avatar jiaxiang-wu commented on August 20, 2024
  1. For ImageNet, we discover that distillation is sometimes helpful for training with compression algorithms, e.g. uniform quantization.
  2. It is also observed in some papers that simply using distillation on the classification logits can be harmful for training a full-precision model, e.g. Table 5 in [1]. Distilling with the attention map [2] or factor vector [1] may be a better choice.

[1] Jangho Kim, SeongUk Park, and Nojun Kwak, Paraphrasing Complex Network: Network Compression via Factor Transfer, NIPS 2018.
[2] Sergey Zagoruyko and Nikos Komodakis, Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer, ICLR 2017.

from pocketflow.

as754770178 avatar as754770178 commented on August 20, 2024

Thanks, I don't compress the model . I only want to finetune resnet_v1_50 to get high acuuracy. Can I use distillation.

from pocketflow.

jiaxiang-wu avatar jiaxiang-wu commented on August 20, 2024

Then you can try out the above two papers' algorithms (not implemented in PocketFlow).

from pocketflow.

as754770178 avatar as754770178 commented on August 20, 2024

thanks

from pocketflow.

Related Issues (20)

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.