Skip to content

Commit

Permalink
Made lambda and alpha of eltype(x)
Browse files Browse the repository at this point in the history
  • Loading branch information
thebhatman authored Mar 7, 2019
1 parent 47c1324 commit c6e51f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layers/normalise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ end

function (a::AlphaDropout)(x)
a.active || return x
λ = 1.0507009873554804934193349852946
α = 1.6732632423543772848170429916717
λ = eltype(x)(1.0507009873554804934193349852946)
α = eltype(x)(1.6732632423543772848170429916717)
α1 = eltype(x)(-λ*α)
noise = randn(eltype(x), size(x))
x = @. x*(noise > (1 - a.p)) + α1 * (noise <= (1 - a.p))
Expand Down

0 comments on commit c6e51f5

Please sign in to comment.