Unverified Commit a704cd45 authored by pkulzc's avatar pkulzc Committed by GitHub
Browse files

Update learning_schedules.py for object detection python3 compatibility

parents 7922c9eb ef84dca1
......@@ -169,7 +169,7 @@ def manual_stepping(global_step, boundaries, rates, warmup=False):
boundaries = [0] + boundaries
num_boundaries = len(boundaries)
rate_index = tf.reduce_max(tf.where(tf.greater_equal(global_step, boundaries),
range(num_boundaries),
list(range(num_boundaries)),
[0] * num_boundaries))
return tf.reduce_sum(rates * tf.one_hot(rate_index, depth=num_boundaries),
name='learning_rate')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment