Skip to content

Commit

Permalink
Merge #1490
Browse files Browse the repository at this point in the history
1490: Make Dropout docstring clear w.r.t. N-D dropout r=DhairyaLGandhi a=darsnack

Make the docstring specify N-dimensional dropouts more clearly (i.e. so that people don't think we don't have `Dropout3d` etc.).

### PR Checklist

- [x] ~~Tests are added~~
- [x] ~~Entry in NEWS.md~~
- [x] Documentation, if applicable
- [x] ~~Final review from `@dhairyagandhi96` (for API changes).~~


Co-authored-by: Kyle Daruwalla <daruwalla@wisc.edu>
Co-authored-by: Kyle Daruwalla <daruwalla.k.public@icloud.com>
  • Loading branch information
3 people authored Jan 31, 2021
2 parents 06d23b3 + 5cac6f6 commit 8f7ef92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/layers/normalise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ end
Dropout layer. In the forward pass, apply the [`Flux.dropout`](@ref) function on the input.
To apply dropout along certain dimension(s), specify the `dims` keyword.
e.g. `Dropout(p; dims = 3)` will randomly zero out entire channels on WHCN input
(also called 2D dropout).
Does nothing to the input once [`Flux.testmode!`](@ref) is `true`.
"""
mutable struct Dropout{F,D}
Expand Down Expand Up @@ -420,4 +424,4 @@ function Base.show(io::IO, l::GroupNorm)
print(io, "GroupNorm($(join(size(l.β), ", "))")
(l.λ == identity) || print(io, ", λ = $(l.λ)")
print(io, ")")
end
end

0 comments on commit 8f7ef92

Please sign in to comment.