class_docstr: An implementation of the DQN agent.
class_docstr_tok: ["An","implementation","of","the","DQN","agent","."]
docstr: Builds the Q-value network computations needed for acting and training.
  
  These are:
    self.online_convnet: For computing the current state's Q-values.
    self.target_convnet: For computing the next state's target Q-values.
    self._net_outputs: The actual Q-values.
    self._q_argmax: The action maximizing the current state's Q-values.
    self._replay_net_outputs: The replayed states' Q-values.
    self._replay_next_target_net_outputs: The replayed next states' target
      Q-values (see Mnih et al., 2015 for details).
docstr_tok: ["Builds","the","Q-value","network","computations","needed","for","acting","and","training",".","These","are",":","self.online_convnet",":","For","computing","the","current","state","'s","Q-values",".","self.target_convnet",":","For","computing","the","next","state","'s","target","Q-values",".","self._net_outputs",":","The","actual","Q-values",".","self._q_argmax",":","The","action","maximizing","the","current","state","'s","Q-values",".","self._replay_net_outputs",":","The","replayed","states","'","Q-values",".","self._replay_next_target_net_outputs",":","The","replayed","next","states","'","target","Q-values","(","see","Mnih","et","al.",",","2015","for","details",")","."]
code: def _build_networks(self):
      """Builds the Q-value network computations needed for acting and training.
  
      These are:
        self.online_convnet: For computing the current state's Q-values.
        self.target_convnet: For computing the next state's target Q-values.
        self._net_outputs: The actual Q-values.
        self._q_argmax: The action maximizing the current state's Q-values.
        self._replay_net_outputs: The replayed states' Q-values.
        self._replay_next_target_net_outputs: The replayed next states' target
          Q-values (see Mnih et al., 2015 for details).
      """
  
      # _network_template instantiates the model and returns the network object.
      # The network object can be used to generate different outputs in the graph.
      # At each call to the network, the parameters will be reused.
      self.online_convnet = self._create_network(name="Online")
      self.target_convnet = self._create_network(name="Target")
      self._net_outputs = self.online_convnet(self.state_ph)
      # TODO(bellemare): Ties should be broken. They are unlikely to happen when
      # using a deep network, but may affect performance with a linear
      # approximation scheme.
      self._q_argmax = tf.argmax(self._net_outputs.q_values, axis=1)[0]
      self._replay_net_outputs = self.online_convnet(
          self._replay.states
      )
      self._replay_next_target_net_outputs = self.target_convnet(
          self._replay.next_states
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  import random
  from absl import logging
  from dopamine.discrete_domains import atari_lib
  from dopamine.replay_memory import circular_replay_buffer
  import gin.tf
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling the DQNAgent obj's underlying member method code with example usage: obj._build_networks() without return types