Coder Social home page Coder Social logo

Comments (12)

5v3D3 avatar 5v3D3 commented on May 24, 2024 1

If this issue is still open, from what I can tell, it is because the train function of the Trainer class is only calling train_step (which isn't calling paramupdate hook anymore). So you could add backward and step calls after train_step or just use the train function inherited from algorithmbase via algorithm.train() instead (this one calls all necessary hooks, I needed to manually send my model to gpu though).

from semi-supervised-learning.

hijihyo avatar hijihyo commented on May 24, 2024 1

If this issue is still open, from what I can tell, it is because the train function of the Trainer class is only calling train_step (which isn't calling paramupdate hook anymore). So you could add backward and step calls after train_step or just use the train function inherited from algorithmbase via algorithm.train() instead (this one calls all necessary hooks, I needed to manually send my model to gpu though).

I met the same problem, but 5V3D3's solution did help. When I used algorithm.train() instead of trainer.fit() the performance was improving. I used the following code:

algorithm.model = algorithm.model.cuda()
algorithm.train()

from semi-supervised-learning.

Hhhhhhao avatar Hhhhhhao commented on May 24, 2024

Can provide more information? Which model are you using? What's the learning rate?

from semi-supervised-learning.

SamShowalter avatar SamShowalter commented on May 24, 2024

Hi, the beginner notebook is exactly the same as is provided except for the parameters that I noted above. So the model is the vit_tiny_patch and the learning rate 5e-4 as provided. The learning rate looks like it could be low to me, but I figured that the provided example was tuned to train well.

from semi-supervised-learning.

ppsmk388 avatar ppsmk388 commented on May 24, 2024

I meet the same problem

from semi-supervised-learning.

hldqiuye123 avatar hldqiuye123 commented on May 24, 2024

Hi, the beginner notebook is exactly the same as is provided except for the parameters that I noted above. So the model is the vit_tiny_patch and the learning rate 5e-4 as provided. The learning rate looks like it could be low to me, but I figured that the provided example was tuned to train well.

Have you solved it? "I have encountered the same problem, but after increasing the learning rate, there is still no change. The model consistently outputs the same results.".

from semi-supervised-learning.

wzc32 avatar wzc32 commented on May 24, 2024

I've met the same!!
Do other notebooks run all right?

from semi-supervised-learning.

SamShowalter avatar SamShowalter commented on May 24, 2024

Any update? Could someone who has it working provide their config file as well as the output performance to serve as a sanity check?

from semi-supervised-learning.

sachinmotwani20 avatar sachinmotwani20 commented on May 24, 2024
algorithm.model = algorithm.model.cuda()
algorithm.train()

The above code works for me. Not sure how to perform the evaluation in this context. Tried the following.
algorithm.eval()

AttributeError: 'FixMatch' object has no attribute 'eval'

Any suggestions?

from semi-supervised-learning.

Hhhhhhao avatar Hhhhhhao commented on May 24, 2024

Fixed in PR #135

from semi-supervised-learning.

github-actions avatar github-actions commented on May 24, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

from semi-supervised-learning.

github-actions avatar github-actions commented on May 24, 2024

This issue was closed because it has been stalled for 5 days with no activity.

from semi-supervised-learning.

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.