GithubHelp home page GithubHelp logo

How to run this model? about rml-cnn HOT 4 CLOSED

mymuli avatar mymuli commented on May 25, 2024
How to run this model?

from rml-cnn.

Comments (4)

bbenligiray avatar bbenligiray commented on May 25, 2024

I've updated the readme for instructions about the datasets and the pretrained model.

The code allows you to train from scratch, for example python main.py nus_wide random robust_warp 100 0 would train a randomly initialized model on NUS-WIDE with fully supervised rml-cnn loss. See here for how these parameters work. You can add an --optimize parameter to do hyperparameter optimization.

from rml-cnn.

mymuli avatar mymuli commented on May 25, 2024

@bbenligiray Thank you very much first!
But in the params.py file, I am confused about these parameters,[No_lr_steps、Lr_patience、No_random_start、No_opt_iters] ,Can you explain them?
At the same time, what's the difference between parameter imagenet and parameter imagenet2?
Thank you again!

from rml-cnn.

bbenligiray avatar bbenligiray commented on May 25, 2024

no_lr_steps = 2 -> there will be two learning rate steps. So if we start training with a learning rate of 0.1, after val_loss stops improving, continue training with 0.1*0.1=0.01 learning rate (so the first step with 0.1 and the second step with 0.01 learning rate)
lr_patience=10 -> stop training if val_loss doesn't improve for 10 epochs

no_random_starts=8
no_opt_iters=15 this means first try 8 random hyperparameter sets between the given intervals, then try to converge to the best result with 15-8=7 additional tries. See this.

So let's you started optimizing your hyperparameters with --optimize and ended up on the border (for example you were searching between 0.1 and 0.001 learning rate and ended up on 0.001). This means that the optimal hyperparameter was likely outside your initial interval (the first interval is named imagenet). Then you would set the second interval (imagenet2) between 0.001 and 0.00001 and run main.py with --optimize --cont. This parses the earlier training result between 0.1 and 0.001 to make a more educated estimation rather than starting from the scratch.

Basically it's a bit of over-engineering on my part. If you are not going to use the --cont parameter, you can ignore imagenet2.

from rml-cnn.

mymuli avatar mymuli commented on May 25, 2024

@bbenligiray I was inspired,Thank you again!

from rml-cnn.

Related Issues (3)

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.