-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support NamedTuples for Container Layers #1680
Comments
I think this in combo with @mcabbott's "big show" would make models really readable. Like big show can print the names alongside the other info. Is forwarding methods conceptually linked here (am I missing something)? For |
That works already in the sense that we can optionally store named tuples, what was spoken about in the discussion was how to leverage it for larger models. Forwarding indexing would be needed. The printing is really to have custom show methods, since the |
Lines 26 to 29 in 0a21546
|
I think |
1681: Support NamedTuples for Chain + Parallel r=mcabbott a=mcabbott Closes #1680, WIP. Todo list includes: - [x] add Parallel too - [ ] ~~worry about whether any of this will upset Zygote, like FluxML/Zygote.jl#909 or, kick that can down the road. - [x] add tests Co-authored-by: Michael Abbott <[email protected]>
1681: Support NamedTuples for Chain + Parallel r=DhairyaLGandhi a=mcabbott Closes #1680, WIP. Todo list includes: - [x] add Parallel too - [ ] ~~worry about whether any of this will upset Zygote, like FluxML/Zygote.jl#909 or, kick that can down the road. - [x] add tests Co-authored-by: Michael Abbott <[email protected]>
This came up in FluxML/Metalhead.jl#70 and surprised me, because I thought we supported this already!
Other than
Chain
, are there any other layers we'd want to support this? The only other one that uses a tuple field isParallel
, but since it doesn't forward methods to.layers
I'm not sure this is applicable.Another thing using NamedTuples would open up is the possibility of defining aliases for
Chain
. e.g.The text was updated successfully, but these errors were encountered: