Skip to content

Commit

Permalink
replace keep_dims (deprecated in TF) with keepdims
Browse files Browse the repository at this point in the history
Exact warning message:
```
From align/detect_face.py:212: calling reduce_sum (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
```
  • Loading branch information
Dobiasd authored Mar 31, 2018
1 parent fe78f66 commit e13d5a9
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 e13d5a9

Please sign in to comment.