We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cef95a commit ab3a189Copy full SHA for ab3a189
src/unary.jl
@@ -45,6 +45,7 @@ unary_ops = [
45
# "normcdfinv",
46
# "rcbrt",
47
("relu", "relu", "(xi>0?xi:0)"),
48
+("elu", "elu", "(xi>0?xi:exp(xi)-1)")
49
# "rint",
50
"round",
51
# "rsqrt",
@@ -153,21 +154,6 @@ broadcast(::typeof(+), a::KnetArray)=a
153
154
+(a::KnetArray)=a
155
-(a::KnetArray)=broadcast(-,a)
156
-"""
157
- elu(x, alpha=1)
158
-
159
-Exponential Linear Unit. Returns
160
-`max(0,x) + alpha*(exp(min(x,0)) - 1)
161
162
-Paper Ref. :
163
-"Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs) (ICLR 2016)"
164
165
-function elu(x, alpha=1)
166
- p = relu(x)
167
- m = -relu(-x)
168
- return p + alpha*(exp(m) - 1)
169
-end
170
171
"""
172
selu(x)
173
0 commit comments