提交 8b6160df authored 作者: f0k's avatar f0k

Use expm1 for elu

上级 0784ab7b
...@@ -2420,7 +2420,7 @@ def elu(x, alpha=1): ...@@ -2420,7 +2420,7 @@ def elu(x, alpha=1):
"Fast and Accurate Deep Network Learning by "Fast and Accurate Deep Network Learning by
Exponential Linear Units (ELUs)" <http://arxiv.org/abs/1511.07289>`. Exponential Linear Units (ELUs)" <http://arxiv.org/abs/1511.07289>`.
""" """
return tensor.switch(x > 0, x, alpha * (tensor.exp(x) - 1)) return tensor.switch(x > 0, x, alpha * tensor.expm1(x))
class ScalarSoftsign(theano.scalar.UnaryScalarOp): class ScalarSoftsign(theano.scalar.UnaryScalarOp):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论