Skip to content

Commit e9d4e8e

Browse files
committed
Fixed keepdims
1 parent 51fc8cb commit e9d4e8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/align/detect_face.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ def fc(self, inp, num_out, name, relu=True):
207207
"""
208208
@layer
209209
def softmax(self, target, axis, name=None):
210-
max_axis = tf.reduce_max(target, axis, keep_dims=True)
210+
max_axis = tf.reduce_max(target, axis, keepdims=True)
211211
target_exp = tf.exp(target-max_axis)
212-
normalize = tf.reduce_sum(target_exp, axis, keep_dims=True)
212+
normalize = tf.reduce_sum(target_exp, axis, keepdims=True)
213213
softmax = tf.div(target_exp, normalize, name)
214214
return softmax
215215

0 commit comments

Comments
 (0)