Skip to content

Commit

Permalink
fix elu activation function (tflearn#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengyaoJiang authored and aymericdamien committed Jul 29, 2017
1 parent 6b05603 commit d28030a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tflearn/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,4 @@ def selu(x):
"""
alpha = 1.6732632423543772848170429916717
scale = 1.0507009873554804934193349852946
return scale * tf.nn.elu(x, alpha)
return scale*tf.where(x>=0.0, x, alpha*tf.nn.elu(x))

0 comments on commit d28030a

Please sign in to comment.