c48128868e7edcbf354ff79fa29fa0b79740b2f4,scripts/tf_cnn_benchmarks/benchmark_cnn.py,BenchmarkCNN,_build_fetches,#BenchmarkCNN#Any#Any#Any#Any#Any#Any#Any#Any#Any#,2233

Before Change



        if self.params.summary_verbosity >= 2:
          // Histogram of log values of all non-zero gradients.
          all_grads = []
          for grad, var in avg_grads:
            all_grads.append(tf.reshape(grad, [-1]))
          grads = tf.abs(tf.concat(all_grads, 0))
          // exclude grads with zero values.
          indices_for_non_zero_grads = tf.where(tf.not_equal(grads, 0))
          log_grads = tf.reshape(
              tf.log(tf.gather(grads, indices_for_non_zero_grads)), [-1])
          tf.summary.histogram("log_gradients", log_grads)

        if self.params.summary_verbosity >= 3:
          for grad, var in avg_grads:

After Change


                                          self.model, examples_per_step)

        if gradient_clip is not None:
          with tf.name_scope("clip_gradients"):
            clipped_grads = [(tf.clip_by_value(grad, -gradient_clip,
                                               +gradient_clip), var)
                             for grad, var in avg_grads]
        else:
          clipped_grads = avg_grads

        learning_rate = tf.identity(learning_rate, name="learning_rate_tensor")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/benchmarks
Commit Name: c48128868e7edcbf354ff79fa29fa0b79740b2f4
Time: 2018-07-18
Author: reedwm@google.com
File Name: scripts/tf_cnn_benchmarks/benchmark_cnn.py
Class Name: BenchmarkCNN
Method Name: _build_fetches


Project Name: tensorflow/benchmarks
Commit Name: c48128868e7edcbf354ff79fa29fa0b79740b2f4
Time: 2018-07-18
Author: reedwm@google.com
File Name: scripts/tf_cnn_benchmarks/benchmark_cnn.py
Class Name: BenchmarkCNN
Method Name: _build_fetches


Project Name: dpressel/mead-baseline
Commit Name: 19d2bbc7d6e70836f34b83ac7702a0477e4b97b0
Time: 2019-11-19
Author: blester125@gmail.com
File Name: python/eight_mile/tf/layers.py
Class Name: BiLSTMEncoder1
Method Name: call


Project Name: tensorflow/ranking
Commit Name: 27aef1f3aa3dff22df125ca8a2fa4a4447ac6234
Time: 2019-08-13
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/utils.py
Class Name:
Method Name: organize_valid_indices