flax
ec995477 - Relax parameter attribute check

Commit
5 years ago
Relax parameter attribute check We currently try to enforce that a user can't do: ```py class MyModule(nn.Module): def setup(self): self.name1 = self.param('name2', ...) ``` But the check is brittle and entirely disallows assigning dicts or lists of parameters. This check relaxes our heuristic such that it doesn't run at all for lists or dicts of parameters assigned to attributes during setup. See https://github.com/google/flax/issues/705#issuecomment-738761853 for a bit more context.
Author
Parents
Loading