code: def __init__(
      self,
      obs_dim,
      action_dim,
      hiddens_actor,
      hiddens_critic,
      layer_norm=False,
      memory_size=50000,
  ):
      self.obs_dim = obs_dim
      self.action_dim = action_dim
  
      self.noise_stddev = 1.0
      self.noise_stddev_decrease = 5e-4
      self.noise_stddev_lower = 5e-2
  
      actor_activations = [
          dy.tanh for _ in range(len(hiddens_actor))
      ] + [dy.tanh]
      critic_activations = [
          dy.tanh for _ in range(len(hiddens_critic))
      ] + [None]
      self.actor = MLP(
          inpt_shape=(obs_dim,),
          hiddens=hiddens_actor + [action_dim],
          activation=actor_activations,
          layer_norm=layer_norm,
      )
      self.critic = MLP(
          inpt_shape=(obs_dim + action_dim,),
          hiddens=hiddens_critic + [1],
          activation=critic_activations,
          layer_norm=layer_norm,
      )
      self.actor_target = MLP(
          inpt_shape=(obs_dim,),
          hiddens=hiddens_actor + [action_dim],
          activation=actor_activations,
          layer_norm=layer_norm,
      )
      self.critic_target = MLP(
          inpt_shape=(obs_dim + action_dim,),
          hiddens=hiddens_critic + [1],
          activation=critic_activations,
          layer_norm=layer_norm,
      )
      self.actor_target.update(self.actor, soft=False)
      self.critic_target.update(self.critic, soft=False)
  
      self.trainer_actor = dy.AdamTrainer(self.actor.pc)
      self.trainer_critic = dy.AdamTrainer(self.critic.pc)
      self.trainer_actor.set_learning_rate(1e-4)
      self.trainer_critic.set_learning_rate(1e-3)
  
      self.memory = Memory(memory_size)
  
file_path: dynet/examples/reinforcement-learning/ddpg.py
imports: import dynet
  import numpy
  from memory import Memory
  from network import MLP
label_desc: Use image node_id 1 to create a new DDPG object  with example: obj = DDPG(obs_dim, action_dim, hiddens_actor, hiddens_critic, layer_norm, memory_size)