Skip to content

Commit fef561e

Browse files
ShoofLLCdarsnack
andauthored
Update src/layers/normalise.jl
Co-authored-by: Kyle Daruwalla <daruwalla.k.public@icloud.com>
1 parent 06f58d6 commit fef561e

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
@@ -49,8 +49,8 @@ dropout_mask(rng, x::CuArray, p; kwargs...) =
4949
throw(ArgumentError("x isa CuArray, but rng isa $(typeof(rng)). dropout_mask only support CUDA.RNG for CuArrays."))
5050
dropout_mask(rng, x, p; kwargs...) = _dropout_mask(rng, x, p; kwargs...)
5151
function _dropout_mask(rng, x, p; dims=:)
52-
fptype = float(real(eltype(x)))
53-
y = rand!(rng, similar(x, fptype, _dropout_shape(x, dims)))
52+
realfptype = float(real(eltype(x)))
53+
y = rand!(rng, similar(x, realfptype, _dropout_shape(x, dims)))
5454
y .= _dropout_kernel.(y, p, 1 - p)
5555
return y
5656
end

0 commit comments

Comments
 (0)