Giter Site home page Giter Site logo

Comments (4)

ShunLu91 avatar ShunLu91 commented on September 26, 2024

Hi,
I think first you can load the weights into the supernet, and then inherit the weights from the supernet for each sampled architecture. Specifically, your can obtain the weights from the supernet for each selected operation per layer according to the predifined operation name.
Hope my answer will help you.

from single-path-one-shot-nas.

abhishektyagi-t avatar abhishektyagi-t commented on September 26, 2024

Thank you for your quick response.

I am actually a bit confused as to how I can implement the approach you mentioned above. Let me try to break it down as per my understanding:

  1. First I will load the pre-trained weights of the supernet.
  2. Once the weights for the supernet are loaded, I can generate a list (choice) that will select the random architecture

Now my questions are:

  1. How do I do this: "Specifically, you can obtain the weights from the supernet for each selected operation per layer according to the predefined operation name."
  2. Is it possible for me to save the random-selected model just like we can save any other model in PyTorch?

I appreciate your help!

from single-path-one-shot-nas.

ShunLu91 avatar ShunLu91 commented on September 26, 2024

As for your two questions:

  1. The supernet weights is a dict. Each selected operation per layer can be seen as a 'key' for this dict, so you can obtain its corresponding weights from this dict as long as you have the right operation name i.e. the 'key'. The operation name is usually pre-defined when you initialize the model.
  2. It's not that convenient. You should first initialize a random-selected model, and then inherit weights for each operation in the random-selected model as above, and finally you can save this model with its weights as any other model in PyTorch.

If you have any questions, please feel free to ask.

from single-path-one-shot-nas.

ShunLu91 avatar ShunLu91 commented on September 26, 2024

As there are no update recently, I will close this issue.
Feel free to re-open it if you have any question.

from single-path-one-shot-nas.

Related Issues (15)

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.