Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Mar 23, 2018
1 parent 7cef95a commit ab3a189
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/unary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ unary_ops = [
# "normcdfinv",
# "rcbrt",
("relu", "relu", "(xi>0?xi:0)"),
("elu", "elu", "(xi>0?xi:exp(xi)-1)")
# "rint",
"round",
# "rsqrt",
Expand Down Expand Up @@ -153,21 +154,6 @@ broadcast(::typeof(+), a::KnetArray)=a
+(a::KnetArray)=a
-(a::KnetArray)=broadcast(-,a)

"""
elu(x, alpha=1)
Exponential Linear Unit. Returns
`max(0,x) + alpha*(exp(min(x,0)) - 1)
Paper Ref. :
"Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs) (ICLR 2016)"
"""
function elu(x, alpha=1)
p = relu(x)
m = -relu(-x)
return p + alpha*(exp(m) - 1)
end

"""
selu(x)
Expand Down

0 comments on commit ab3a189

Please sign in to comment.