Inheritance of linen Modules does not work #1305
-
Consider this simple example of three consequent inheritances: from flax import linen
class First(linen.Module):
param0: int
class Second(First):
param1: int
class Third(Second):
param2: int On the definition of the third classes the following exception is raised:
What could be a problem? Please note, that two consequent inheritance does work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I am actually not sure what the bug was, but it appears that this will be fixed in the next release of Flax. When I run your code on a Colab and pip install from our repo the error doesn't show up anymore: https://colab.research.google.com/drive/1sAZSkirM_MbK6FiMGqkbTxObuuTbQMs9?usp=sharing I've added it to the CHANGELOG: https://github.com/google/flax/blob/master/CHANGELOG.md |
Beta Was this translation helpful? Give feedback.
I am actually not sure what the bug was, but it appears that this will be fixed in the next release of Flax. When I run your code on a Colab and pip install from our repo the error doesn't show up anymore: https://colab.research.google.com/drive/1sAZSkirM_MbK6FiMGqkbTxObuuTbQMs9?usp=sharing
I've added it to the CHANGELOG: https://github.com/google/flax/blob/master/CHANGELOG.md