Training nnx NN models without pre-defining number of layers/neurons #4692
Unanswered
yigitcancomlek
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I am trying to convert my code in linen to nnx. My previous linen code was able to handle any given architecture for a simple multi-layer neural network through the call function. However, with nnx, it looks like I need to pre-define my layers in the init to achieve this, which is a bit inconvenient, considering if I want to do hyperparameter optimization or just simply try different architectures for my data. All the examples in the flax nnx version website also predefines architecture before training the model. Therefore, I was wondering if the developers could kindly provide a simple example of how to handle any architecture without predefining it in the class, that would be great! If this is not possible, assuming I understood this Q&A correctly, please let me know as well! Thanks a lot in advance!
Beta Was this translation helpful? Give feedback.
All reactions