What is replace
in TrainState
#2042
-
Hello, I am looking at the code of Thank you very much |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
We inherit from |
Beta Was this translation helpful? Give feedback.
-
I see thank you very much ! |
Beta Was this translation helpful? Give feedback.
PyTreeNode
implements the init_subclass method, which will converts the subclass (in this caseTrainState
) into a Flax dataclass, which does implement the replace method.We inherit from
PyTreeNode
to avoid type checking issues when using pytype.