Skip to content

optax.multi_transform + nnx.State/nnx.Optimizer troubles #3954

Closed Answered by cgarciae
yklcs asked this question in Q&A
Discussion options

You must be logged in to vote

Interesting. You are right that State is currently restrictive regarding the value type. I think it can be safely generalized to be generic over the value type e.g. State[V] and then have V be StateLeaf for current APIs graph APIs but users can just change the type for these kind of situations.

To answer your question I think its safe to do what you are showing. I'll going to turn this into an issue.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by yklcs
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants