Git Product home page Git Product logo

Comments (7)

ManuBN786 avatar ManuBN786 commented on June 8, 2024

I could fix the error by by changing the teacher model name in 'configs/strategies/distill/resnet_dist.yaml' from 'tv_resnet34' to 'resnet34'.
Now the student model trains well.

But I don't know how to improve the teacher model accuracy

from dist_kd.

hunto avatar hunto commented on June 8, 2024

Dear @ManuBN786 ,

Sorry for the late reply. Have you tried your dataset and training settings on your training framework or other frameworks?

from dist_kd.

ManuBN786 avatar ManuBN786 commented on June 8, 2024

Yes on a resnet50 from pytorch, it give a validation accuracy of 0.93.

I dont know how using DSIT_KD the validation accuracy is so poor

from dist_kd.

hunto avatar hunto commented on June 8, 2024

One bug I can find is that your training uses input images with 384x384 resolution, but the resolution in our framework is set to 224 with hard code. (see build_train_transforms and build_val_transforms in https://github.com/hunto/image_classification_sota/blob/main/lib/dataset/transform.py)

You should manually change all the 224 to 384 at L21, L32, and L61; and change 256 to 440 at L60.

from dist_kd.

ManuBN786 avatar ManuBN786 commented on June 8, 2024

Ok. Thanks for letting me know.

from dist_kd.

ManuBN786 avatar ManuBN786 commented on June 8, 2024

low_acc

I did all of the above mentioned for image size 384, but I still get a very low accuracy for the teacher.

from dist_kd.

hunto avatar hunto commented on June 8, 2024

It's difficult for me to identify the differences between this repo and the example code by pytorch. If you want to use DIST KD in your project, I think the easiest way is to add KD code in our existing and valid code (You just need to initialize a pretrained teacher, compute its outputs wrt the batch input, and compute and backward the KD loss).

from dist_kd.

Related Issues (11)

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.