We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4773a69 commit a67400fCopy full SHA for a67400f
src/layers/normalise.jl
@@ -10,7 +10,7 @@ _dropout_shape(s, dims) = tuple((i ∉ dims ? 1 : si for (i, si) ∈ enumerate(s
10
_dropout_kernel(y::T, p, q) where {T} = y > p ? T(1 / q) : T(0)
11
12
"""
13
- dropout([rng = _rng_from_array(x)], x, p; dims=:, active=true)
+ dropout([rng = rng_from_array(x)], x, p; dims=:, active=true)
14
15
The dropout function. If `active` is `true`,
16
for each input, either sets that input to `0` (with probability
@@ -34,7 +34,7 @@ function dropout(rng, x, p; dims=:, active::Bool=true)
34
y = dropout_mask(rng, x, p, dims=dims)
35
return x .* y
36
end
37
-dropout(x, p; kwargs...) = dropout(_rng_from_array(x), x, p; kwargs...)
+dropout(x, p; kwargs...) = dropout(rng_from_array(x), x, p; kwargs...)
38
39
dropout_mask(rng::CUDA.RNG, x::CuArray, p; kwargs...) = _dropout_mask(rng, x, p; kwargs...)
40
dropout_mask(rng, x::CuArray, p; kwargs...) =
src/utils.jl
@@ -34,7 +34,7 @@ ofeltype(x, y) = convert(float(eltype(x)), y)
epseltype(x) = eps(float(eltype(x)))
- _rng_from_array([x])
+ rng_from_array([x])
Create an instance of the RNG most appropriate for `x`.
The current defaults are:
0 commit comments