Giter Site home page Giter Site logo

Comments (6)

xjtushujun avatar xjtushujun commented on May 25, 2024

请参考文章关于更新MW-Net参数的数学表达式。

from meta-weight-net.

jingzhengli avatar jingzhengli commented on May 25, 2024

optimizer_c中优化的是vnet的参数,但是损失l_g_meta中我没有看到vnet网络的参与,我有点想不清楚网络是如何迭代的
损失l_g_meta是meta_model和vnet网络的共同参与计算的,所以是在一个计算图中的。这也是meta_model存在的意义,做一个桥梁作用。
226行:
l_g_meta.backward()
这一步更新的不仅是临时模型的参数,也包含了vnet

from meta-weight-net.

justlovebarbecue avatar justlovebarbecue commented on May 25, 2024

@xjtushujun @jingzhengli 您好,我也是看到这个地方,有些不理解。meta_model 本身是不包含vnet的,vnet的梯度是怎么计算出来的呢?我发现meta_model.update_params这行代码应该很重要,我去掉这行,vnet的梯度就不能计算了。可是这行代码调用的函数 只和meta_model相关,是怎么能和vnet有联系的呢?如果方便 麻烦讲解一下,谢谢您!

from meta-weight-net.

YAaNnGg avatar YAaNnGg commented on May 25, 2024

It's related to the update_params() method defined in MetaModule class in resnet.py.

from meta-weight-net.

trafficpre avatar trafficpre commented on May 25, 2024

关于网络参数更新的问题想请教一下,
optimizer_c.zero_grad()
l_g_meta.backward()
optimizer_c.step()
这几行应该是要更新vnet网络的参数,但是vnet.state_dict()观察发现网络参数并没有变化。还有后边优化model参数的时候也是一样的问题,麻烦解释一下,谢谢!

from meta-weight-net.

Dawn-LX avatar Dawn-LX commented on May 25, 2024

same problem, can anyone explain this? I understand all the math in the paper, but I dont understand the code for gradient calculation.

from meta-weight-net.

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.