Skip to content

Commit a67400f

Browse files
committed
fix tests (typos)
1 parent 4773a69 commit a67400f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/layers/normalise.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _dropout_shape(s, dims) = tuple((i ∉ dims ? 1 : si for (i, si) ∈ enumerate(s
1010
_dropout_kernel(y::T, p, q) where {T} = y > p ? T(1 / q) : T(0)
1111

1212
"""
13-
dropout([rng = _rng_from_array(x)], x, p; dims=:, active=true)
13+
dropout([rng = rng_from_array(x)], x, p; dims=:, active=true)
1414
1515
The dropout function. If `active` is `true`,
1616
for each input, either sets that input to `0` (with probability
@@ -34,7 +34,7 @@ function dropout(rng, x, p; dims=:, active::Bool=true)
3434
y = dropout_mask(rng, x, p, dims=dims)
3535
return x .* y
3636
end
37-
dropout(x, p; kwargs...) = dropout(_rng_from_array(x), x, p; kwargs...)
37+
dropout(x, p; kwargs...) = dropout(rng_from_array(x), x, p; kwargs...)
3838

3939
dropout_mask(rng::CUDA.RNG, x::CuArray, p; kwargs...) = _dropout_mask(rng, x, p; kwargs...)
4040
dropout_mask(rng, x::CuArray, p; kwargs...) =

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ofeltype(x, y) = convert(float(eltype(x)), y)
3434
epseltype(x) = eps(float(eltype(x)))
3535

3636
"""
37-
_rng_from_array([x])
37+
rng_from_array([x])
3838
3939
Create an instance of the RNG most appropriate for `x`.
4040
The current defaults are:

0 commit comments

Comments
 (0)