Skip to content

Commit

Permalink
Merge pull request davidsandberg#677 from Dobiasd/patch-1
Browse files Browse the repository at this point in the history
replace keep_dims (deprecated in TF) with keepdims
  • Loading branch information
davidsandberg authored Mar 31, 2018
2 parents fe78f66 + e13d5a9 commit fc3b4c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/align/detect_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ def fc(self, inp, num_out, name, relu=True):
"""
@layer
def softmax(self, target, axis, name=None):
max_axis = tf.reduce_max(target, axis, keep_dims=True)
max_axis = tf.reduce_max(target, axis, keepdims=True)
target_exp = tf.exp(target-max_axis)
normalize = tf.reduce_sum(target_exp, axis, keep_dims=True)
normalize = tf.reduce_sum(target_exp, axis, keepdims=True)
softmax = tf.div(target_exp, normalize, name)
return softmax

Expand Down

0 comments on commit fc3b4c6

Please sign in to comment.