class_docstr: Deep Deterministic Policy Gradients.
  
  This can be used as SVG(0) by specifying a Gaussian policy instead of a
  deterministic policy.
  
  Args:
      model (DDPGModel): DDPG model that contains both a policy and a
          Q-function
      actor_optimizer (Optimizer): Optimizer setup with the policy
      critic_optimizer (Optimizer): Optimizer setup with the Q-function
      replay_buffer (ReplayBuffer): Replay buffer
      gamma (float): Discount factor
      explorer (Explorer): Explorer that specifies an exploration strategy.
      gpu (int): GPU device id if not None nor negative.
      replay_start_size (int): if the replay buffer's size is less than
          replay_start_size, skip update
      minibatch_size (int): Minibatch size
      update_interval (int): Model update interval in step
      target_update_interval (int): Target model update interval in step
      phi (callable): Feature extractor applied to observations
      target_update_method (str): 'hard' or 'soft'.
      soft_update_tau (float): Tau of soft target update.
      n_times_update (int): Number of repetition of update
      average_q_decay (float): Decay rate of average Q, only used for
          recording statistics
      average_loss_decay (float): Decay rate of average loss, only used for
          recording statistics
      batch_accumulator (str): 'mean' or 'sum'
      episodic_update (bool): Use full episodes for update if set True
      episodic_update_len (int or None): Subsequences of this length are used
          for update if set int and episodic_update=True
      logger (Logger): Logger used
      batch_states (callable): method which makes a batch of observations.
          default is `chainerrl.misc.batch_states.batch_states`
      burnin_action_func (callable or None): If not None, this callable
          object is used to select actions before the model is updated
          one or more times during training.
code: def __init__(
      self,
      model,
      actor_optimizer,
      critic_optimizer,
      replay_buffer,
      gamma,
      explorer,
      gpu=None,
      replay_start_size=50000,
      minibatch_size=32,
      update_interval=1,
      target_update_interval=10000,
      phi=lambda x: x,
      target_update_method="hard",
      soft_update_tau=1e-2,
      n_times_update=1,
      average_q_decay=0.999,
      average_loss_decay=0.99,
      episodic_update=False,
      episodic_update_len=None,
      logger=getLogger(__name__),
      batch_states=batch_states,
      burnin_action_func=None,
  ):
      self.model = model
  
      if gpu is not None and gpu >= 0:
          cuda.get_device_from_id(gpu).use()
          self.model.to_gpu(device=gpu)
  
      self.xp = self.model.xp
      self.replay_buffer = replay_buffer
      self.gamma = gamma
      self.explorer = explorer
      self.gpu = gpu
      self.target_update_interval = target_update_interval
      self.phi = phi
      self.target_update_method = target_update_method
      self.soft_update_tau = soft_update_tau
      self.logger = logger
      self.average_q_decay = average_q_decay
      self.average_loss_decay = average_loss_decay
      self.actor_optimizer = actor_optimizer
      self.critic_optimizer = critic_optimizer
      if episodic_update:
          update_func = self.update_from_episodes
      else:
          update_func = self.update
      self.replay_updater = ReplayUpdater(
          replay_buffer=replay_buffer,
          update_func=update_func,
          batchsize=minibatch_size,
          episodic_update=episodic_update,
          episodic_update_len=episodic_update_len,
          n_times_update=n_times_update,
          replay_start_size=replay_start_size,
          update_interval=update_interval,
      )
      self.batch_states = batch_states
      self.burnin_action_func = burnin_action_func
  
      self.t = 0
      self.last_state = None
      self.last_action = None
      self.target_model = copy.deepcopy(self.model)
      disable_train(self.target_model["q_function"])
      disable_train(self.target_model["policy"])
      self.average_q = 0
      self.average_actor_loss = 0.0
      self.average_critic_loss = 0.0
  
      # Aliases for convenience
      self.q_function = self.model["q_function"]
      self.policy = self.model["policy"]
      self.target_q_function = self.target_model["q_function"]
      self.target_policy = self.target_model["policy"]
  
      self.sync_target_network()
  
imports: import copy
  from logging import getLogger
  import chainer
  from chainer import cuda
  import chainer.functions
  from chainerrl.agent import AttributeSavingMixin
  from chainerrl.agent import BatchAgent
  from chainerrl.misc.batch_states import batch_states
  from chainerrl.misc.copy_param import synchronize_parameters
  from chainerrl.recurrent import Recurrent
  from chainerrl.recurrent import RecurrentChainMixin
  from chainerrl.recurrent import state_kept
  from chainerrl.replay_buffer import batch_experiences
  from chainerrl.replay_buffer import ReplayUpdater
label_desc: Use image node_id 1 to create a new DDPG object from inherited base classes: AttributeSavingMixin, BatchAgent with example: obj = DDPG(model, actor_optimizer, critic_optimizer, replay_buffer, gamma, explorer, gpu, replay_start_size, minibatch_size, update_interval, target_update_interval, phi, target_update_method, soft_update_tau, n_times_update, average_q_decay, average_loss_decay, episodic_update, episodic_update_len, logger, batch_states, burnin_action_func)