class_docstr: Train and evaluate DQN on Atari.
class_docstr_tok: ["Train","and","evaluate","DQN","on","Atari","."]
docstr: Initialize the graph for sess.
docstr_tok: ["Initialize","the","graph","for","sess","."]
code: def _initialize_graph(self, sess):
      """Initialize the graph for sess."""
      self._train_checkpointer.initialize_or_restore(sess)
      self._rb_checkpointer.initialize_or_restore(sess)
      common.initialize_uninitialized_variables(sess)
  
      sess.run(self._init_agent_op)
  
      self._train_step_call = sess.make_callable(self._train_op)
  
      self._collect_timer = timer.Timer()
      self._train_timer = timer.Timer()
      self._action_timer = timer.Timer()
      self._step_timer = timer.Timer()
      self._observer_timer = timer.Timer()
  
      global_step_val = sess.run(self._global_step)
      self._timed_at_step = global_step_val
  
      # Call save to initialize the save_counter (need to do this before
      # finalizing the graph).
      self._train_checkpointer.save(global_step=global_step_val)
      self._policy_checkpointer.save(global_step=global_step_val)
      self._rb_checkpointer.save(global_step=global_step_val)
      sess.run(self._train_summary_writer.init())
  
      if self._do_eval:
          sess.run(self._eval_summary_writer.init())
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl import app
  from absl import flags
  from absl import logging
  import gin
  import numpy
  import tensorflow
  from tf_agents.agents.categorical_dqn import categorical_dqn_agent
  from tf_agents.environments import batched_py_environment
  from tf_agents.environments import suite_atari
  from tf_agents.eval import metric_utils
  from tf_agents.metrics import py_metric
  from tf_agents.metrics import py_metrics
  from tf_agents.networks import categorical_q_network
  from tf_agents.networks import network
  from tf_agents.policies import epsilon_greedy_policy
  from tf_agents.policies import py_tf_policy
  from tf_agents.policies import random_py_policy
  from tf_agents.replay_buffers import py_hashed_replay_buffer
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.utils import common
  from tf_agents.utils import timer
label_desc: Use image node_id 4 for calling the TrainEval obj's underlying member method code with example usage: obj._initialize_graph(sess) without return types