Tight couplings in the design of network modules #35
activatedgeek
started this conversation in
Ideas
Replies: 1 comment
-
Hey @activatedgeek, thanks for reaching out!
Cheers! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thank you for the great work on this library.
I want to open up a discussion about a few design decisions of tight couplings with the
nn.Module
definitions, and suggest alternatives.In its current form, the model definition is tighly coupled with a few moving parts:
nn.Module
.model.apply({ 'params': params, **other_vars}, ....)
call. Similarly, if we can process the checkpoints intoFrozenDict
's that can be loaded viaflax.training.checkpoints
. This makes things like transfer learning easier because I can directly modify the params PyTree in theFrozenDict
instead of worrying about the size of the output from thenn.Module
. i.e. keep everything except the last layer params the same and just reinit the last layer params using an appropriate initializer.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions