GithubHelp home page GithubHelp logo

HyperNetWork is not being trained about hyperiqa HOT 2 OPEN

ssl92 avatar ssl92 commented on August 22, 2024 5
HyperNetWork is not being trained

from hyperiqa.

Comments (2)

SuperBruceJia avatar SuperBruceJia commented on August 22, 2024

@SSL92

from hyperiqa.

SuperBruceJia avatar SuperBruceJia commented on August 22, 2024

With respect to the file "HyerIQASolver.py"

In line 20 you store the parameter of the HyperNetwork to be trained in the variable "self.hypernet_params".

self.hypernet_params = filter(lambda p: id(p) not in backbone_params, self.model_hyper.parameters())

From line 77 to 84 you update the optimizer with this variable self.hypernet_params

Since self.model_hyper.parameters() returns an iterator, self.hypernet_params is an iterator and after the optimizer is initialized, it becomes empty. Therefore, after the first epoch, the optimizer doesn't optimize the HyperNetwork anymore because self.hypernet_params is empty.

Setting self.hypernet_params as a list should fix the problem: self.hypernet_params = list(filter(lambda p: id(p) not in backbone_params, self.model_hyper.parameters()))

After trained the model, I found the performances are almost the same with or without using the list.
Should we have to use list(...) for self. hypernet_params ?

from hyperiqa.

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.