class_docstr: An implementation of the DQN agent.
class_docstr_tok: ["An","implementation","of","the","DQN","agent","."]
docstr: Builds ops for assigning weights from online to target network.
  
  Returns:
    ops: A list of ops assigning weights from online to target network.
docstr_tok: ["Builds","ops","for","assigning","weights","from","online","to","target","network",".","Returns",":","ops",":","A","list","of","ops","assigning","weights","from","online","to","target","network","."]
code: def _build_sync_op(self):
      """Builds ops for assigning weights from online to target network.
  
      Returns:
        ops: A list of ops assigning weights from online to target network.
      """
      # Get trainable variables from online and target DQNs
      sync_qt_ops = []
      scope = tf.compat.v1.get_default_graph().get_name_scope()
      trainables_online = tf.compat.v1.get_collection(
          tf.compat.v1.GraphKeys.TRAINABLE_VARIABLES,
          scope=os.path.join(scope, "Online"),
      )
      trainables_target = tf.compat.v1.get_collection(
          tf.compat.v1.GraphKeys.TRAINABLE_VARIABLES,
          scope=os.path.join(scope, "Target"),
      )
  
      for w_online, w_target in zip(
          trainables_online, trainables_target
      ):
          # Assign weights from online to target network.
          sync_qt_ops.append(
              w_target.assign(w_online, use_locking=True)
          )
      return sync_qt_ops
  
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 7 for calling the DQNAgent obj's underlying member method code with example usage: obj._build_sync_op() and returns: sync_qt_ops