Skip to content

Commit

Permalink
Changed default behaviour of ExpclampLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Nov 9, 2023
1 parent a5cab87 commit dff2ab6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/activation_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function GaLUlayer()
end

function ExpClampLayer()
return ActivationFunction(x -> ExpClamp(x), y -> ExpClampInv(y/2f0), (Δy, y) -> ExpClampGrad(Δy*2f0, y/2f0))
return ActivationFunction(x -> ExpClamp(x), y -> ExpClampInv(y), (Δy, y) -> ExpClampGrad(Δy, y))
end


Expand Down Expand Up @@ -286,7 +286,7 @@ function ExpClampInv(y::AbstractArray{T, N}; clamp=T(2)) where {T, N}
if any(y .≈ 0)
throw(InputError("Input contains zeros."))
else
return tan.(log.(y) / clamp / T(0.636))
return tan.(log.(y) / T(clamp) / T(0.636))
end
end

Expand Down

0 comments on commit dff2ab6

Please sign in to comment.