Skip to content

What is the equivalent of nn.map_variables in the nnx API? #4464

Answered by cgarciae
carlesoctav asked this question in General
Discussion options

You must be logged in to vote

@carlesoctav you mimic map_variables using nnx.split to get the pytree state and nnx.update to update the Module after you've modified the state. See https://flax.readthedocs.io/en/latest/nnx_basics.html#the-flax-functional-api.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by carlesoctav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants