nn.compact should be default #494
Replies: 1 comment 1 reply
-
Hi @juliuskunze -- nice to "see" you here :) I turned this into a discussion -- if we end up with consensus on a change let's file an issue then. During our Linen design discussions, at first we did make So in our intermediate design, we had a distinction between Another way to think about it, while I agree that the vast majority of modules benefit from using Your point about wrapping existing functions is a valid one, and I've heard of people who want that kind of behavior to interoperate with existing numerical computation library. For that we could add a small wrapper e.g. |
Beta Was this translation helpful? Give feedback.
-
Nice to see flax progress, getting processed into linen! (:
I guess the overwhelming majority of user module definitions can and should use
nn.compact
. Can we remove the attribute and have something likenn.noncompact
instead for the few remaining cases where it's necessary? Otherwise, I think this would clutter most use cases with an extra line. In particular, linen would become more friendly for the (important) use case of defining tiny wrappers around existing parametrized functions, like a loss around a classifier etc.Beta Was this translation helpful? Give feedback.
All reactions