-
-
Notifications
You must be signed in to change notification settings - Fork 104
AddInto #256
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
AddInto #256
Conversation
adds type Model = AddInto<(Linear<2, 5>, Linear<3, 5>)>;
let model: Model = Default::default();
let _: Tensor1D<5> = model.forward((Tensor1D::<2>::zeros(), Tensor1D::<3>::zeros())); This should help with some types of recurrent networks, as it's now easier to input extra things besides the standard input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! Pretty easy to understand the macros too. Can you make the following changes:
- a couple small fixes for ModuleMut (as I suggested in the comments)
- can you add serialization for this into
src/nn/npz_impls.rs
? It should be relatively easy since you can just use the sub modules implementation for serialization
Alright, will make the changes when I have the time! |
for npz saving/loading I can probably just copy the implementation for SplitInto as it's effectively the same struct, just different functionality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 thanks for the contribution!
Noice, thanks for making such a cool crate for neural nets! |
AddInto, to allow easier multiple inputs for networks