code: def __init__(self, nb_states, nb_actions, args):
      self.nb_states = nb_states
      self.nb_actions = nb_actions
  
      # Create Actor and Critic Network
      net_cfg = {
          "hidden1": args.hidden1,
          "hidden2": args.hidden2,
          # 'init_w': args.init_w
      }
      self.actor = Actor(self.nb_states, self.nb_actions, **net_cfg)
      self.actor_target = Actor(
          self.nb_states, self.nb_actions, **net_cfg
      )
      self.actor_optim = Adam(self.actor.parameters(), lr=args.lr_a)
  
      self.critic = Critic(self.nb_states, self.nb_actions, **net_cfg)
      self.critic_target = Critic(
          self.nb_states, self.nb_actions, **net_cfg
      )
      self.critic_optim = Adam(self.critic.parameters(), lr=args.lr_c)
  
      self.hard_update(
          self.actor_target, self.actor
      )  # Make sure target is with the same weight
      self.hard_update(self.critic_target, self.critic)
  
      # Create replay buffer
      self.memory = SequentialMemory(
          limit=args.rmsize, window_length=args.window_length
      )
      # self.random_process = OrnsteinUhlenbeckProcess(size=nb_actions, theta=args.ou_theta, mu=args.ou_mu,
      #                                                sigma=args.ou_sigma)
  
      # Hyper-parameters
      self.batch_size = args.bsize
      self.tau = args.tau
      self.discount = args.discount
      self.depsilon = 1.0 / args.epsilon
      self.lbound = 0.0  # args.lbound
      self.rbound = 1.0  # args.rbound
  
      # noise
      self.init_delta = args.init_delta
      self.delta_decay = args.delta_decay
      self.warmup = args.warmup
  
      #
      self.epsilon = 1.0
      # self.s_t = None  # Most recent state
      # self.a_t = None  # Most recent action
      self.is_training = True
  
      #
      if USE_CUDA:
          self.cuda()
  
      # moving average baseline
      self.moving_average = None
      self.moving_alpha = 0.5
  
imports: import numpy
  import torch
  import torch.nn
  from torch.optim import Adam
  from .memory import SequentialMemory
  from .utils import to_numpy, to_tensor
label_desc: Use image node_id 1 to create a new DDPG object from inherited base classes: object with example: obj = DDPG(nb_states, nb_actions, args)