Skip to content

Commit

Permalink
revert back kuma and make log1pexp safe
Browse files Browse the repository at this point in the history
  • Loading branch information
xukai92 committed Apr 28, 2019
1 parent fd22faa commit 653f4b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/neural/activations.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TODO: implement CUDA kernels for below

log1pexp(x) = log1p(exp(x))
log1pexp(x) = log1p(exp(-abs(x))) + max(x, 0)
logexpm1(x) = log(expm1(x))

const softplus = log1pexp
Expand Down
4 changes: 2 additions & 2 deletions src/neural/stochastic_layers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const BINARY_DIST_DICT = Dict(
, :softplus),
:GaussianLogVar => (:BatchNormalLogVar, , :identity,
:logΣ, :identity),
:Kumaraswamy => (:BatchKumaraswamy, :a, :(Knet.relu),
:b, :(Knet.relu)),
:Kumaraswamy => (:BatchKumaraswamy, :a, :softplus,
:b, :softplus),
)

for dist_sym in keys(BINARY_DIST_DICT)
Expand Down

0 comments on commit 653f4b3

Please sign in to comment.