docstr: DDPG algorithm
  
  Args:
      model(parl.Model): forward network of actor and critic.
      gamma(float): discounted factor for reward computation
      tau (float): decay coefficient when updating the weights of self.target_model with self.model
      actor_lr (float): learning rate of the actor model
      critic_lr (float): learning rate of the critic model
docstr_tok: ["DDPG","algorithm","Args",":","model","(","parl.Model",")",":","forward","network","of","actor","and","critic",".","gamma","(","float",")",":","discounted","factor","for","reward","computation","tau","(","float",")",":","decay","coefficient","when","updating","the","weights","of","self.target_model","with","self.model","actor_lr","(","float",")",":","learning","rate","of","the","actor","model","critic_lr","(","float",")",":","learning","rate","of","the","critic","model"]
code: def __init__(
      self, model, gamma=None, tau=None, actor_lr=None, critic_lr=None
  ):
      """DDPG algorithm
  
      Args:
          model(parl.Model): forward network of actor and critic.
          gamma(float): discounted factor for reward computation
          tau (float): decay coefficient when updating the weights of self.target_model with self.model
          actor_lr (float): learning rate of the actor model
          critic_lr (float): learning rate of the critic model
      """
      # checks
      check_model_method(model, "value", self.__class__.__name__)
      check_model_method(model, "policy", self.__class__.__name__)
      check_model_method(
          model, "get_actor_params", self.__class__.__name__
      )
      check_model_method(
          model, "get_critic_params", self.__class__.__name__
      )
      assert isinstance(gamma, float)
      assert isinstance(tau, float)
      assert isinstance(actor_lr, float)
      assert isinstance(critic_lr, float)
  
      self.gamma = gamma
      self.tau = tau
      self.actor_lr = actor_lr
      self.critic_lr = critic_lr
  
      self.model = model
      self.target_model = deepcopy(self.model)
      self.actor_optimizer = paddle.optimizer.Adam(
          learning_rate=actor_lr,
          parameters=self.model.get_actor_params(),
      )
      self.critic_optimizer = paddle.optimizer.Adam(
          learning_rate=critic_lr,
          parameters=self.model.get_critic_params(),
      )
  
file_path: PARL/parl/algorithms/paddle/ddpg.py
imports: import parl
  import paddle
  import paddle.nn.functional
  from copy import deepcopy
  from parl.utils.utils import check_model_method
label_desc: Use image node_id 1 to create a new DDPG object from inherited base classes: parl with example: obj = DDPG(model, gamma, tau, actor_lr, critic_lr)