ecec43ee2dd7d21a08d68d00c668ea54bde03672,scripts/tf_cnn_benchmarks/benchmark_cnn.py,BenchmarkCNN,_run_eval,#BenchmarkCNN#,1600

Before Change


    table_init_ops = tf.tables_initializer()
    variable_mgr_init_ops = [local_var_init_op]
    if table_init_ops:
      variable_mgr_init_ops.extend([table_init_ops])
    with tf.control_dependencies([local_var_init_op]):
      variable_mgr_init_ops.extend(self.variable_mgr.get_post_init_ops())
    local_var_init_op_group = tf.group(*variable_mgr_init_ops)
    summary_op = tf.summary.merge_all()

After Change


    Raises:
      ValueError: If self.params.train_dir is unspecified.
    
    if self.params.train_dir is None:
      raise ValueError("Trained model directory not specified")
    graph_info = self._build_eval_graph()
    saver = tf.train.Saver(self.variable_mgr.savable_variables())
    summary_writer = tf.summary.FileWriter(self.params.eval_dir,
                                           tf.get_default_graph())
    target = ""
    // TODO(huangyp): Check if checkpoints haven"t updated for hours and abort.
    while True:
      with tf.Session(
          target=target, config=create_config_proto(self.params)) as sess:
        image_producer = None
        try:
          global_step = load_checkpoint(saver, sess, self.params.train_dir)
          image_producer = self._initialize_eval_graph(
              graph_info.enqueue_ops, graph_info.input_producer_op,
              graph_info.local_var_init_op_group, sess)
        except CheckpointNotFoundException:
          log_fn("Checkpoint not found in %s" % self.params.train_dir)
        else:  // Only executes if an exception was not thrown
          self._eval_once(sess, summary_writer, graph_info.fetches,
                          graph_info.summary_op, image_producer, global_step)
        if image_producer is not None:
          image_producer.done()
        if self.params.eval_interval_secs <= 0:
          break
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/benchmarks
Commit Name: ecec43ee2dd7d21a08d68d00c668ea54bde03672
Time: 2018-10-08
Author: reedwm@google.com
File Name: scripts/tf_cnn_benchmarks/benchmark_cnn.py
Class Name: BenchmarkCNN
Method Name: _run_eval


Project Name: matplotlib/matplotlib
Commit Name: 6af745055995bdb2891470a0f030cf481035dcc9
Time: 2018-10-28
Author: jklymak@gmail.com
File Name: lib/matplotlib/figure.py
Class Name: Figure
Method Name: get_tightbbox


Project Name: matplotlib/matplotlib
Commit Name: 7c2b45d962bcf8eda85329b8ce52796a4d9257fc
Time: 2018-10-28
Author: jklymak@gmail.com
File Name: lib/matplotlib/figure.py
Class Name: Figure
Method Name: get_tightbbox