GithubHelp home page GithubHelp logo

The role of projector layer about simkd HOT 7 CLOSED

ZX-lang avatar ZX-lang commented on July 17, 2024
The role of projector layer

from simkd.

Comments (7)

DefangChen avatar DefangChen commented on July 17, 2024

Generally, feature distributions of the teacher and student model are statistically different and cannot be directly compared in practice even their dimensions are equal. We thus follow the setting of previous KD methods (e.g., FitNet, CRD, SRRL, SemCKD) and retain this design.

Experiments show that without reusing the teacher classifier, the modified student model (containing extra projector layer) cannot achieve good results by training with regular cross-entropy loss or KD loss. This indicates the projector layer itself do not sufficiently account for the SimKD performance.

from simkd.

ZX-lang avatar ZX-lang commented on July 17, 2024

Generally, feature distributions of the teacher and student model are statistically different and cannot be directly compared in practice even their dimensions are equal. We thus follow the setting of previous KD methods (e.g., FitNet, CRD, SRRL, SemCKD) and retain this design.

Experiments show that without reusing the teacher classifier, the modified student model (containing extra projector layer) cannot achieve good results by training with regular cross-entropy loss or KD loss. This indicates the projector layer itself do not sufficiently account for the SimKD performance.

Thank you for your reply. So how to find a method to remove the projector is still a difficult problem.

from simkd.

DefangChen avatar DefangChen commented on July 17, 2024

Exactly. I believe it is of great importance to the KD research.

from simkd.

ZX-lang avatar ZX-lang commented on July 17, 2024

Exactly. I believe it is of great importance to the KD research.

Thank you. I will try some other way to solve this problem.

from simkd.

ZX-lang avatar ZX-lang commented on July 17, 2024

Exactly. I believe it is of great importance to the KD research.

When I use wrn40_2 as teacher and wrn40_1 as a student, I get a result that is not as good as the paper shows, could you please release the implementation of wrn

from simkd.

DefangChen avatar DefangChen commented on July 17, 2024

Note that the implementation of wrn in CRD is somewhat problematic. It actually contains 38 layers rather than 40 layers. We have discussed this issue in line 18-24 of resnet.py. (Due to the existence of this issue, I recommend to use resnet-depth x factor rather than wrn-depth x factor.)

In all our implementations, we actually use resnet.py to obtain resnet-38x2 using the scripts and rename it as wrn40_2 for consistency. (The pretrained resnet-38x2 model has been provided in GoogleDrive.)

If you use a pre-trained teacher model with lower accuracy, it may lead to lower accuracy for all KD methods.

from simkd.

ZX-lang avatar ZX-lang commented on July 17, 2024

Note that the implementation of wrn in CRD is somewhat problematic. It actually contains 38 layers rather than 40 layers. We have discussed this issue in line 18-24 of resnet.py. (Due to the existence of this issue, I recommend to use resnet-depth x factor rather than wrn-depth x factor.)

In all our implementations, we actually use resnet.py to obtain resnet-38x2 using the scripts and rename it as wrn40_2 for consistency. (The pretrained resnet-38x2 model has been provided in GoogleDrive.)

If you use a pre-trained teacher model with lower accuracy, it may lead to lower accuracy for all KD methods.

Thank you. I will try it

from simkd.

Related Issues (17)

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.