-
-
Notifications
You must be signed in to change notification settings - Fork 600
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
Expand RNN/LSTM/GRU docs #1772
Expand RNN/LSTM/GRU docs #1772
Conversation
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.
This is great! My only significant request would be to switch over the output array summaries to |> size
like you have for [recur].state
. That would save some vertical space and keep consistency with other layers (e.g.
Lines 79 to 92 in 20f9535
julia> layer(xs) |> size | |
(96, 96, 7, 50) | |
julia> Conv((5,5), 3 => 7; stride = 2)(xs) |> size | |
(48, 48, 7, 50) | |
julia> Conv((5,5), 3 => 7; stride = 2, pad = SamePad())(xs) |> size | |
(50, 50, 7, 50) | |
julia> Conv((1,1), 3 => 7; pad = (20,10,0,0))(xs) |> size | |
(130, 100, 7, 50) | |
julia> Conv((5,5), 3 => 7; stride = 2, dilation = 4)(xs) |> size | |
(42, 42, 7, 50) |
Thanks for the comments, I condensed the examples as you suggested. |
Doctests appear to be failing because the previous line comments of |
I split it into two code-blocks. The first one is a |
Apologies for yet more revisions, but WDYT about extracting the "bad" behaviour as a shared block under the |
I changed all but the RNN docstring to have a reference to RNN in a warning about the batch size changing. The RNN docstring has the original example of the behavior. I wasn't able to check that the docs rendered correctly though, do you mind taking a look? |
Let me just check if docs previews can be made to work here. If not, I'll pull locally and confirm (if or you can, that would be swell). |
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.
Ok, double-checked the syntax against https://github.com/FluxML/Flux.jl/blob/master/docs/src/models/recurrence.md?plain=1#L111-L123 and everything looks fine. Thanks for the PR!
bors r+ |
I was able to build them locally (JuliaDocs/Documenter.jl#1413 (comment)) and it looked good. Thanks for the comments. |
Build succeeded: |
This PR adds expanded documentation to the RNN/LSTM/GRU/GRUv3 docs, resolving #1696.
It addresses the
in
andout
parameter meanings and adds a warning about a common gotcha (not calling reset when batch sizes are changed).