Repository navigation
Do JAX Arrays in a Module always have to be Variables?
#4732
|
Is this possible? Not really a problem, but I have arrays that I know will remain static in my |
Replies: 2 comments 16 replies
|
Hi @rademacher-p, using |
|
@cgarciae Can I have some further guidance on this, given the changes to Flax in the past year? As per our discussion above, I've been wrapping any arbitrary/custom pytrees in Are there any other ways to proceed besides One comparable case I've seen in the source is for Thanks for the help 🙏 |
@rademacher-p originally Optimizer was written like this as well e.g.
self.opt_state = OptState(opt_state). We ran into an edge case eventually (don't exactly remember) so we switched to wrapping the leaves instead but you can try. It does work: