class_docstr: Deep Q learning agent for episodic setting.
  
  A Q learning algorithm consists of several components:
  
      - A **Q-net** takes in a state and returns Q-value for action sampling.
        See :class:`~texar.tf.modules.CategoricalQNet` for an example Q-net
        class and required interface.
      - A **replay memory** manages past experience for Q-net updates. See        :class:`~texar.tf.core.DequeReplayMemory` for an example replay memory        class and required interface.
      - An **exploration** that specifies the exploration strategy used        to train the Q-net. See        :class:`~texar.tf.core.EpsilonLinearDecayExploration` for an example        class and required interface.
  
  Args:
      env_config: An instance of :class:`~texar.tf.agents.EnvConfig`
          specifying action space, observation space, and reward range, etc.
          Use :func:`~texar.tf.agents.get_gym_env_config` to create an
          EnvConfig from a gym environment.
      sess (optional): A tf session.
          Can be `None` here and set later with `agent.sess = session`.
      qnet (optional): A Q network that predicts Q values given states.
          If not given, a Q network is created based on :attr:`hparams`.
      target (optional): A target network to compute target Q values.
      qnet_kwargs (dict, optional): Keyword arguments for qnet
          constructor. Note that the `hparams` argument for network
          constructor is specified in the "policy_hparams" field of
          :attr:`hparams` and should not be included in `policy_kwargs`.
          Ignored if :attr:`qnet` is given.
      qnet_caller_kwargs (dict, optional): Keyword arguments for
          calling `qnet` to get Q values. The `qnet` is called with
          :python:`outputs=qnet(inputs=observation, **qnet_caller_kwargs)`
      replay_memory (optional): A replay memory instance.
          If not given, a replay memory is created based on :attr:`hparams`.
      replay_memory_kwargs (dict, optional): Keyword arguments for
          replay_memory constructor.
          Ignored if :attr:`replay_memory` is given.
      exploration (optional): An exploration instance used in the algorithm.
          If not given, an exploration instance is created based on
          :attr:`hparams`.
      exploration_kwargs (dict, optional): Keyword arguments for exploration
          class constructor. Ignored if :attr:`exploration` is given.
      hparams (dict or HParams, optional): Hyperparameters. Missing
          hyperparamerters will be set to default values. See
          :meth:`default_hparams` for the hyperparameter sturcture and
          default values.
class_docstr_tok: ["Deep","Q","learning","agent","for","episodic","setting",".","A","Q","learning","algorithm","consists","of","several","components",":","-","A","*","*","Q-net","*","*","takes","in","a","state","and","returns","Q-value","for","action","sampling",".","See",":","class",":","`","~texar.tf.modules.CategoricalQNet","`","for","an","example","Q-net","class","and","required","interface",".","-","A","*","*","replay","memory","*","*","manages","past","experience","for","Q-net","updates",".","See",":","class",":","`","~texar.tf.core.DequeReplayMemory","`","for","an","example","replay","memory","class","and","required","interface",".","-","An","*","*","exploration","*","*","that","specifies","the","exploration","strategy","used","to","train","the","Q-net",".","See",":","class",":","`","~texar.tf.core.EpsilonLinearDecayExploration","`","for","an","example","class","and","required","interface",".","Args",":","env_config",":","An","instance","of",":","class",":","`","~texar.tf.agents.EnvConfig","`","specifying","action","space",",","observation","space",",","and","reward","range",",","etc",".","Use",":","func",":","`","~texar.tf.agents.get_gym_env_config","`","to","create","an","EnvConfig","from","a","gym","environment",".","sess","(","optional",")",":","A","tf","session",".","Can","be","`","None","`","here","and","set","later","with","`","agent.sess","=","session","`",".","qnet","(","optional",")",":","A","Q","network","that","predicts","Q","values","given","states",".","If","not","given",",","a","Q","network","is","created","based","on",":","attr",":","`","hparams","`",".","target","(","optional",")",":","A","target","network","to","compute","target","Q","values",".","qnet_kwargs","(","dict",",","optional",")",":","Keyword","arguments","for","qnet","constructor",".","Note","that","the","`","hparams","`","argument","for","network","constructor","is","specified","in","the","``","policy_hparams","''","field","of",":","attr",":","`","hparams","`","and","should","not","be","included","in","`","policy_kwargs","`",".","Ignored","if",":","attr",":","`","qnet","`","is","given",".","qnet_caller_kwargs","(","dict",",","optional",")",":","Keyword","arguments","for","calling","`","qnet","`","to","get","Q","values",".","The","`","qnet","`","is","called","with",":","python",":","`","outputs=qnet","(","inputs=observation",",","*","*","qnet_caller_kwargs",")","`","replay_memory","(","optional",")",":","A","replay","memory","instance",".","If","not","given",",","a","replay","memory","is","created","based","on",":","attr",":","`","hparams","`",".","replay_memory_kwargs","(","dict",",","optional",")",":","Keyword","arguments","for","replay_memory","constructor",".","Ignored","if",":","attr",":","`","replay_memory","`","is","given",".","exploration","(","optional",")",":","An","exploration","instance","used","in","the","algorithm",".","If","not","given",",","an","exploration","instance","is","created","based","on",":","attr",":","`","hparams","`",".","exploration_kwargs","(","dict",",","optional",")",":","Keyword","arguments","for","exploration","class","constructor",".","Ignored","if",":","attr",":","`","exploration","`","is","given",".","hparams","(","dict","or","HParams",",","optional",")",":","Hyperparameters",".","Missing","hyperparamerters","will","be","set","to","default","values",".","See",":","meth",":","`","default_hparams","`","for","the","hyperparameter","sturcture","and","default","values","."]
code: def _update_target(self, feed_dict):
      if self._target_update_strategy == "tau" or (
          self._target_update_strategy == "copy"
          and self._timestep % self._update_period == 0
      ):
          self._sess.run(self._update_op, feed_dict=feed_dict)
  
imports: import random
  import numpy
  import tensorflow
  from texar.tf import context
  from texar.tf.agents.episodic_agent_base import EpisodicAgentBase
  from texar.tf.utils import utils
  from texar.tf.core import optimization
label_desc: Use image node_id 12 for calling the DQNAgent obj's underlying member method code with example usage: obj._update_target(feed_dict) without return types