ce83340731ff66c88ff3d09aa7b70667b7db3f74,ffn/training/model.py,FFNModel,set_up_optimizer,#FFNModel#,134

Before Change


    if trainables:
      var = trainables[0]
      tf.contrib.deprecated.histogram_summary(var.op.name, var)
    with deprecation.silence():
      for var in trainables[1:]:
        tf.contrib.deprecated.histogram_summary(var.op.name, var)
      for grad, var in grads_and_vars:
        tf.contrib.deprecated.histogram_summary(
            "gradients/" + var.op.name, grad)

    self.train_op = opt.apply_gradients(grads_and_vars,
                                        global_step=self.global_step,
                                        name="train")

After Change


    if trainables:
      for var in trainables:
        tf.summary.histogram(var.name.replace(":0", ""), var)
    for grad, var in grads_and_vars:
      tf.summary.histogram(
          "gradients/%s" % var.name.replace(":0", ""), grad)

    update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
    with tf.control_dependencies(update_ops):
      self.train_op = opt.apply_gradients(grads_and_vars,
                                          global_step=self.global_step,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: google/ffn
Commit Name: ce83340731ff66c88ff3d09aa7b70667b7db3f74
Time: 2018-10-28
Author: mjanusz@google.com
File Name: ffn/training/model.py
Class Name: FFNModel
Method Name: set_up_optimizer


Project Name: gyoisamurai/GyoiThon
Commit Name: 4f53bca9b044b20bc4aa8b7719bbbb2984623b3a
Time: 2018-06-04
Author: gyoiler3@gmail.com
File Name: classifier4gyoithon/GyoiClassifier.py
Class Name:
Method Name:


Project Name: gyoisamurai/GyoiThon
Commit Name: 5765f471197edbf64a57dd2628dcd3051c7ea46c
Time: 2018-06-04
Author: gyoiler3@gmail.com
File Name: gyoithon.py
Class Name:
Method Name: