-
-
Notifications
You must be signed in to change notification settings - Fork 615
Add additional dimensions support in Dense layer. #293
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
Conversation
By supporting additional dimensions, the interface of Dense layer would be like this. * Input Shape: (in_features, d1, d2, d3, ..., N) * Ouput Shape: (out_features, d2, d2, d3,..., N)
|
Thanks! A couple comment before we can merge this – I think it'd be cleaner to keep the current You can do this in a single matmul by just reshaping the inputs/outputs to |
|
I have no idea in my mind, could you explain more? Update: Never mind, I get it. |
|
I think we don't need this change anymore according to the above cleaner solution. |
|
Sure, if you can update this PR with the reshape version, that works great for me. |
|
Any eta on when this will be merged? I'm finding myself missing this basic 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.
Tested and it works for me:
a = randn(10, 11, 12)
b = Dense(10, 20)
b(a) # 20x11x12
and more!
a = randn(10, 11, 15, 12)
b = Dense(10, 20)
b(a) # 20×11×15×12
|
this is not an efficient way to do it, we should go through a reshape |
|
Yes, also I tried copying this code to my implementation and I seem to be having some issues with gpu. Don't quote me on this. I would be happy for reshape to be merged, as long as we get something to help out with the case I provided above. |
By supporting additional dimensions, the interface of Dense layer would be like this.
Related discuss: #282