Replies: 1 comment 4 replies
-
Hey! Flax NNX will print all instance attributes of a Module so if you refactor your code such that the activation functions are attributes you should be able to find them with |
Beta Was this translation helpful? Give feedback.
4 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking for a way to reconstruct my NN model while using the new NNX API. If I have a basic MLP with Activations between Linear layers, I am not able to retrieve any information on the Activation layers.
I understand this is due to them being JAX functions rather than NNX Modules. Is there a way for me to perform model surgery and retrieve information about the activation layers of a saved model — without explicitly creating a Flax Module for each activation layer?
Ie if my model has the following architecture:
Using the model surgery techniques in the guides(
display()
,iter_children()
,iter_modules()
, saving/restoring checkpoint) I can only retrieve the following:Beta Was this translation helpful? Give feedback.
All reactions