Linear combinations of parameters across models #1401
Answered
by
jheek
pharringtonp19
asked this question in
Q&A
-
Is there a simple way to take a linear combination of the parameters of a model? Below is my function which initializes parameters for a set of models
|
Beta Was this translation helpful? Give feedback.
Answered by
jheek
Jul 2, 2021
Replies: 2 comments 2 replies
-
Can you elaborate on the question? I don't quite see how the code relates to the question about a linear combination of the parameters of the model |
Beta Was this translation helpful? Give feedback.
1 reply
-
To do this you can make use the
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
marcvanzee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To do this you can make use the
jax.tree_map
util to apply a function (mean in this case) over each param as follows: