58a8f6ea64e30ebfc369153fe2e2591f603f369f,tf_agents/agents/dqn/examples/train_eval_rnn_gym.py,,train_eval,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,63

Before Change



    for train_metric in train_metrics:
      train_metric.tf_summaries(step_metrics=train_metrics[:2])
    summary_op = tf.contrib.summary.all_summary_ops()

    with eval_summary_writer.as_default(), \
         tf.compat.v2.summary.record_if(True):
      for eval_metric in eval_metrics:
        eval_metric.tf_summaries()

    init_agent_op = tf_agent.initialize()

    with tf.compat.v1.Session() as sess:
      tf.contrib.summary.initialize(graph=tf.compat.v1.get_default_graph())
      // Initialize the graph.
      train_checkpointer.initialize_or_restore(sess)
      rb_checkpointer.initialize_or_restore(sess)
      sess.run(iterator.initializer)
      // TODO(sguada) Remove once Periodically can be saved.
      common_utils.initialize_uninitialized_variables(sess)

      sess.run(init_agent_op)
      tf.contrib.summary.initialize(session=sess)
      logging.info("Collecting initial experience.")
      sess.run(initial_collect_op)

      // Compute evaluation metrics.

After Change


    init_agent_op = tf_agent.initialize()

    with tf.compat.v1.Session() as sess:
      sess.run(train_summary_writer.init())
      sess.run(eval_summary_writer.init())
      // Initialize the graph.
      train_checkpointer.initialize_or_restore(sess)
      rb_checkpointer.initialize_or_restore(sess)
      sess.run(iterator.initializer)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: tensorflow/agents
Commit Name: 58a8f6ea64e30ebfc369153fe2e2591f603f369f
Time: 2019-03-04
Author: sguada@google.com
File Name: tf_agents/agents/dqn/examples/train_eval_rnn_gym.py
Class Name:
Method Name: train_eval


Project Name: tensorflow/agents
Commit Name: ce64ea71d9f4f8b896d992508c5f11a70d4d4a38
Time: 2019-03-07
Author: sfishman@google.com
File Name: tf_agents/agents/ddpg/examples/v1/train_eval_rnn.py
Class Name:
Method Name: train_eval


Project Name: tensorflow/agents
Commit Name: ce64ea71d9f4f8b896d992508c5f11a70d4d4a38
Time: 2019-03-07
Author: sfishman@google.com
File Name: tf_agents/agents/ddpg/examples/v1/train_eval.py
Class Name:
Method Name: train_eval


Project Name: tensorflow/agents
Commit Name: 58a8f6ea64e30ebfc369153fe2e2591f603f369f
Time: 2019-03-04
Author: sguada@google.com
File Name: tf_agents/agents/dqn/examples/train_eval_rnn_gym.py
Class Name:
Method Name: train_eval