class_docstr: Write me
      
class_docstr_tok: ["Write","me"]
code: def __init__(
      self,
      nb_actions,
      actor,
      critic,
      critic_action_input,
      memory,
      gamma=0.99,
      batch_size=32,
      nb_steps_warmup_critic=1000,
      nb_steps_warmup_actor=1000,
      train_interval=1,
      memory_interval=1,
      delta_range=None,
      delta_clip=np.inf,
      random_process=None,
      custom_model_objects={},
      target_model_update=0.001,
      **kwargs,
  ):
      if hasattr(actor.output, "__len__") and len(actor.output) > 1:
          raise ValueError(
              'Actor "{}" has more than one output. DDPG expects an actor that has a single output.'.format(
                  actor
              )
          )
      if hasattr(critic.output, "__len__") and len(critic.output) > 1:
          raise ValueError(
              'Critic "{}" has more than one output. DDPG expects a critic that has a single output.'.format(
                  critic
              )
          )
      if critic_action_input not in critic.input:
          raise ValueError(
              'Critic "{}" does not have designated action input "{}".'.format(
                  critic, critic_action_input
              )
          )
      if not hasattr(critic.input, "__len__") or len(critic.input) < 2:
          raise ValueError(
              'Critic "{}" does not have enough inputs. The critic must have at exactly two inputs, one for the action and one for the observation.'.format(
                  critic
              )
          )
  
      super(DDPGAgent, self).__init__(**kwargs)
  
      # Soft vs hard target model updates.
      if target_model_update < 0:
          raise ValueError("`target_model_update` must be >= 0.")
      elif target_model_update >= 1:
          # Hard update every `target_model_update` steps.
          target_model_update = int(target_model_update)
      else:
          # Soft update with `(1 - target_model_update) * old + target_model_update * new`.
          target_model_update = float(target_model_update)
  
      if delta_range is not None:
          warnings.warn(
              "`delta_range` is deprecated. Please use `delta_clip` instead, which takes a single scalar. For now we're falling back to `delta_range[1] = {}`".format(
                  delta_range[1]
              )
          )
          delta_clip = delta_range[1]
  
      # Parameters.
      self.nb_actions = nb_actions
      self.nb_steps_warmup_actor = nb_steps_warmup_actor
      self.nb_steps_warmup_critic = nb_steps_warmup_critic
      self.random_process = random_process
      self.delta_clip = delta_clip
      self.gamma = gamma
      self.target_model_update = target_model_update
      self.batch_size = batch_size
      self.train_interval = train_interval
      self.memory_interval = memory_interval
      self.custom_model_objects = custom_model_objects
  
      # Related objects.
      self.actor = actor
      self.critic = critic
      self.critic_action_input = critic_action_input
      self.critic_action_input_idx = self.critic.input.index(
          critic_action_input
      )
      self.memory = memory
  
      # State.
      self.compiled = False
      self.reset_states()
  
imports: from __future__ import division
  from collections import deque
  import os
  import warnings
  import numpy
  import keras.backend
  import keras.optimizers
  from rl.core import Agent
  from rl.random import OrnsteinUhlenbeckProcess
  from rl.util import *
label_desc: Use image node_id 1 to create a new DDPGAgent object from inherited base classes: Agent with example: obj = DDPGAgent(nb_actions, actor, critic, critic_action_input, memory, gamma, batch_size, nb_steps_warmup_critic, nb_steps_warmup_actor, train_interval, memory_interval, delta_range, delta_clip, random_process, custom_model_objects, target_model_update)