You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two set of parameters, theta from a model created using haiku, and w a set of weights. When training the model, I compute gradient updates wrt to theta on two different datasets yielding grad_f_s and grad_f_d. After I compute these two gradients I want to compute a loss based on these two gradients and get gradient updates for this loss wrt to w (the weights w are used when computing grad_f_s). The problem I am encountering is that when I do this grad_w is all zeroes, even though grad_loss is not zero. I was wondering how to properly compute a gradient update from a loss computed from two other gradients.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have two set of parameters, theta from a model created using haiku, and w a set of weights. When training the model, I compute gradient updates wrt to theta on two different datasets yielding grad_f_s and grad_f_d. After I compute these two gradients I want to compute a loss based on these two gradients and get gradient updates for this loss wrt to w (the weights w are used when computing grad_f_s). The problem I am encountering is that when I do this grad_w is all zeroes, even though grad_loss is not zero. I was wondering how to properly compute a gradient update from a loss computed from two other gradients.
Beta Was this translation helpful? Give feedback.
All reactions