Giter Club home page Giter Club logo

Comments (6)

AvivNavon avatar AvivNavon commented on September 15, 2024

Hey,
Please note that v_i is part of hnet.parameters(), so the update is consistent (mathematically) with the one specified in Alg. 1 of the paper.

from pfedhn.

PhungLai728 avatar PhungLai728 commented on September 15, 2024

Thanks for your prompt response.

Yes, I understood that v_i is part of hnet.parameters().

What does hnet_grads (line 172 in the code) imply for?

  • Whether it is \delta_phi \theta^T \delta \theta for updating \phi?
  • And it is \delta_vi \phi^T \delta_phi \theta^T \delta \theta for updating v_i?

I am still confused about where the term \delta_vi \phi^T goes in the code if the aforementioned is not the case. Since you have all in the hnet_grads, and use it to update both \phi and v_i.

Thanks,

from pfedhn.

PhungLai728 avatar PhungLai728 commented on September 15, 2024

And one more question, in models.py, lines 54 and 55,
emd = self.embeddings(idx)
features = self.mlp(emd)
"features" and "emb", which one is v_i ?

from pfedhn.

AvivNavon avatar AvivNavon commented on September 15, 2024

hnet_grads contains the gradients for all the parameters of the HN (v and phi). The embeddings v are just another layer in the HN, so there's really no difference between v and phi.

For your second question, v is the embedding weights self.embeddings.weight. emb from emd = self.embeddings(idx) is the equivalent of v_i from the paper.

from pfedhn.

PhungLai728 avatar PhungLai728 commented on September 15, 2024

It is clear to me. Thanks a lot for your answers! I closed the issue.

from pfedhn.

Aaron2Woo avatar Aaron2Woo commented on September 15, 2024

@AvivNavon You mentioned that "hnet_grads contains the gradients for all the parameters of the HN (v and phi). The embeddings v are just another layer in the HN, so there's really no difference between v and phi."

So, it means that \delta_vi \phi^T = 1 ?

from pfedhn.

Related Issues (9)

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.