-
Hi, It seems flax not allow modify Module attributes in class Foo(nn.Module):
def __init__(self, a=4,b=None)
self.a = a
self.b = b
if b is None:
self.b = a //2 if a !=0 else 1 I tried setting them in class Foo(nn.Module):
a:int=4
b:Any=None
def setup(self):
if self.b is None:
self.b = self.a//2 if self.a!=0 else 1 |
Beta Was this translation helpful? Give feedback.
Answered by
wztdream
Oct 11, 2021
Replies: 1 comment
-
Sorry, wrong place, It should be in flax repo. How to close or cancel it here? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wztdream
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, wrong place, It should be in flax repo. How to close or cancel it here?