Trouble understading error message : ValueError: Can't call compact methods on unbound modules #988
Unanswered
LysSanzMoreta
asked this question in
Q&A
Replies: 1 comment 3 replies
-
We absolutely need to improve this error message (being tracked at #893 -- I think the error may have changed, but it's the same issue). In short, you have to pass the variables (parameters and other state) via In your case, instead of
you should do:
Constructing a module instance does not give it variables, this is the same as pre-Linen Flax. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I am following the Seq2Seq example https://github.com/google/flax/blob/master/examples/seq2seq/train.py to implement my own little Decoder and I am having some issues with how to place the classes and decorators appropiately, so any help is appreciated. I do not even need to do time series (although the example is a time series), in this case I would like to feed the entire batch [batch_size,max_len,input_size] to the GRU and then obtain the logits [batch_size,max_len,logits_size]. I was able to implement this in a previous version of flax, but I struggle with the new framework. I hope it's not a problem of compatibility between numpyro and flax.
I have
My little example is as follows:
And then I call it from another script as such. I have tried many things but none worked, I put the simplest manner
I would very much appreciate any input on how to structure my code. Thanks! :)
Beta Was this translation helpful? Give feedback.
All reactions