Skip to content

Commit 185ab40

Browse files
authored
Update normalise.jl
1 parent 214b05c commit 185ab40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/layers/normalise.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function dropout(x, p; dims=:, active::Bool=true)
3434
@inbounds @. y = x * _dropout_kernel(y, p, 1-p)
3535
end
3636

37-
Flux.@adjoint function dropout(x, p; dims=:, active::Bool=true)
37+
@adjoint function dropout(x, p; dims=:, active::Bool=true)
3838
active || return x, Δ -> (Δ, nothing)
3939
y = rand!(similar(x, _dropout_shape(x, dims)))
4040
return x .* _dropout_kernel.(y, p, 1-p), Δ ->.* _dropout_kernel.(y, p, 1-p), nothing)
@@ -56,7 +56,7 @@ e.g. `Dropout(p; dims = 3)` will randomly zero out entire channels on WHCN input
5656
(also called 2D dropout).
5757
5858
Does nothing to the input once [`Flux.testmode!`](@ref) is `true`.
59-
"""
59+
"""`
6060
mutable struct Dropout{F,D}
6161
p::F
6262
dims::D

0 commit comments

Comments
 (0)