Giter Club home page Giter Club logo

Comments (6)

JingyunLiang avatar JingyunLiang commented on May 4, 2024

Do you use the latest code? We have fixed the bug as follows in KAIR (see https://github.com/cszn/KAIR/blob/60ddfc0ffb320182c82f7c93f741615dd6a7033b/main_test_swinir.py#L176) and this repo

model.load_state_dict(pretrained_model[param_key_g] if param_key_g in pretrained_model.keys() else pretrained_model, strict=True)

See more discussions here #20

from swinir.

paragon1234 avatar paragon1234 commented on May 4, 2024

Yes I am using latest code for SwinIR/main_test_swinir.py. It worked for other 2 models: 40000_G.pth and 40000_E.pth
However, 40000_optimizerG.pth is giving error.

from swinir.

Viliars avatar Viliars commented on May 4, 2024

Yes I am using latest code for SwinIR/main_test_swinir.py. It worked for other 2 models: 40000_G.pth and 40000_E.pth
However, 40000_optimizerG.pth is giving error.

The word "optimizer" in "40000_optimizerG.pth" means that it is an optimizer, not a model.
The optimizer is saved so that you can continue learning after a break.

"40000_G.pth" - is the model.
"40000_E.pth" - is the model using the EMA strategy.

The authors recommend using EMA - this model is more stable.

from swinir.

JingyunLiang avatar JingyunLiang commented on May 4, 2024

You only need the "40000_E.pth" (the EMA version of model) for testing.

"40000_G.pth" stores the original version of model (can also be used for testing, has similar performance as "40000_E.pth" for classical sr, but is inferior to "40000_E.pth" for GAN-based real-world image sr).

"40000_optimizerG.pth" only stores the optimizer information, no model parameters.

from swinir.

paragon1234 avatar paragon1234 commented on May 4, 2024

Thank you. Can you provide details on what is 4000_E? How does GAN came into the picture?

from swinir.

JingyunLiang avatar JingyunLiang commented on May 4, 2024

EMA strategy can make GAN training more stable. You can find some insights here.

from swinir.

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.