5e854f25098ca40a4ac80197607bf883feaeb375,research/object_detection/utils/learning_schedules.py,,manual_stepping,#Any#Any#Any#,109

Before Change


  step_boundaries = tf.constant(boundaries, tf.int64)
  learning_rates = tf.constant(rates, tf.float32)
  unreached_boundaries = tf.reshape(
      tf.where(tf.greater(step_boundaries, global_step)), [-1])
  unreached_boundaries = tf.concat([unreached_boundaries, [len(boundaries)]], 0)
  index = tf.reshape(tf.reduce_min(unreached_boundaries), [1])
  return tf.reshape(tf.slice(learning_rates, index, [1]), [])

After Change


    raise ValueError("Number of provided learning rates must exceed "
                     "number of boundary points by exactly 1.")
  step_boundaries = tf.constant(boundaries, tf.int32)
  num_boundaries = len(boundaries)
  learning_rates = tf.constant(rates, tf.float32)
  index = tf.reduce_min(
      tf.where(
          // Casting global step to tf.int32 is dangerous, but necessary to be
          // compatible with TPU.
          tf.greater(step_boundaries, tf.cast(global_step, tf.int32)),
          tf.constant(range(num_boundaries), dtype=tf.int32),
          tf.constant([num_boundaries] * num_boundaries, dtype=tf.int32)))
  return tf.reduce_sum(learning_rates * tf.one_hot(index, len(rates),
                                                   dtype=tf.float32))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tensorflow/models
Commit Name: 5e854f25098ca40a4ac80197607bf883feaeb375
Time: 2018-02-13
Author: lzc@google.com
File Name: research/object_detection/utils/learning_schedules.py
Class Name:
Method Name: manual_stepping


Project Name: wenwei202/iss-rnns
Commit Name: f9b98760f445fc0219cfc9c4cada2b5f9d35ab1b
Time: 2017-01-24
Author: seominjoon@gmail.com
File Name: basic/model.py
Class Name: Model
Method Name: _build_loss


Project Name: GPflow/GPflow
Commit Name: 1d3e25c3ad4835ee298675f557e4c78bc8501c74
Time: 2017-03-06
Author: james.hensman@gmail.com
File Name: GPflow/ekernels.py
Class Name: RBF
Method Name: eKxz