flax
78ce743e - Linen `Module` instances are now Frozen after `setup` has been called.

Commit
4 years ago
Linen `Module` instances are now Frozen after `setup` has been called. Previously mutations after setup could be dropped silently. Now the stateless requirement is enforced by raising a TypeError in `__setattr__` after `setup`. Pytrees of dicts and lists are transformed into FrozenDict and tuples during attribute assignment. This avoids undetected submodules and inner state.
Author
Committer
Parents
Loading