Dict to NNX state #4704
Unanswered
thomaspinder
asked this question in
Q&A
Replies: 1 comment
-
|
Hey @thomaspinder, You can create a state = nnx.State({'a': jnp.array(1.0)})State exists for historical reasons and might get deleted in the future in favor of just |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently integrating GPJax with Numpyro. The output of Numpyro's inference objects is a sequence of samples from the model's parameters, and they are represented as a dictionary. Given I know the structure of my model's PyGraph, is there any functionality already in NNX that would allow me to generate a new
Stateobject from a dictionary.For example, if I have the state:
then is there a generic way for me to map a dictionary of the form below back into an instance of this State?
Beta Was this translation helpful? Give feedback.
All reactions