-
-
Notifications
You must be signed in to change notification settings - Fork 615
Added utility function outdims to compute output dimensions of a layer #960
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
end | ||
|
||
@testset "conv output dimensions" begin | ||
m = Conv((3, 3), 3 => 16) |
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.
Would be good to have some tests for different padding, stride and dilation
I can see this being useful. Note that not every method needs a docstring; you can just give one docstring with a couple of examples, otherwise the docs for You can probably reuse the tools in NNlib to calculate this for convolutions, which will make it much less likely to miss anything. |
Okay switched to NNlib.jl, added some more tests w.r.t. pad, stride, etc., and also added a small section to the docs. |
Any ideas on the build errors? I don't really follow the stack trace, and I am not able to reproduce it on my local system. |
Quite unlikely to be your fault, but we should get it passing. If you push a new commit the error might just go away. |
So I guess this didn't work. Have you seen this issue pop up with any other builds since I last pushed? |
We have had a bit of flakiness lately. bors try |
tryBuild succeeded |
It would be great to revive this idea. Perhaps worth rebasing and re-running tests? |
@MikeInnes looks like the build is passing now? Though Travis is only testing for Julia 1.3? |
bors try Let's try this once to see if things are settled down. Post which thoughts on documenting it's scope, since it might be odd to get it running with arbitrary functions? |
tryBuild succeeded |
Sure I can push a commit updating the doc section to specify which layers it works on? |
Perhaps the docs could state which layers it works for out of the box, and give the outdims conv method code to give a handy starting point for people to generate an outdims method for custom layers? |
This is looking good to me and I'm keen to start using these functions. |
I am satisfied with merging it in the current form. |
Happy to merge this now |
Build succeeded |
Based on Slack chatter, I added a utility function,
outdims
, that computes the output dimensions for given input dimensions.Example