Code Monkey home page Code Monkey logo

Comments (3)

davidkvcs avatar davidkvcs commented on August 29, 2024 1

from research-contributions.

tangy5 avatar tangy5 commented on August 29, 2024

Hi @davidkvcs , Thanks for reporting this issue. The pre-trained model checkpoints should contain three keys {'epochs': , 'best_acc', 'state_dict': }

Key "state_dict" should be the model weights, could you direct me to the model checkpoints you've tried, I will double check whether the saved model has consistent key-value items.
Thank you.

from research-contributions.

davidkvcs avatar davidkvcs commented on August 29, 2024

Hi @tangy5

I trained the model my self, using this repo.
Do you have some way I can share this .pth file with you?

Since the next line, model.load_state_dict(model_dict) works fine and the prediction look pretty good I assume, the weights are loaded correctly with the changes I made?

It seems my trained model does not have the three keys {'epochs': , 'best_acc', 'state_dict': }, but holds the state_dict only. When I run model_dict = torch.load(pretrained_pth), model_dict is a OrderedDict of length 159, holding what could look like the trained model weights. Examples of field names:

...
swinViT.patch_embed.proj.weight
swinViT.patch_embed.proj.bias
swinViT.layers1.0.blocka.0.norm1.weight
and so on...

Does that make sense?

from research-contributions.

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.