docstr: SAC algorithm
  
  Args:
      actor (parl.Model): forward network of actor.
      critic (patl.Model): forward network of the critic.
      max_action (float): the largest value that an action can be, env.action_space.high[0]
      alpha (float): Temperature parameter determines the relative importance of the entropy against the reward
      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: ["SAC","algorithm","Args",":","actor","(","parl.Model",")",":","forward","network","of","actor",".","critic","(","patl.Model",")",":","forward","network","of","the","critic",".","max_action","(","float",")",":","the","largest","value","that","an","action","can","be",",","env.action_space.high","[","0","]","alpha","(","float",")",":","Temperature","parameter","determines","the","relative","importance","of","the","entropy","against","the","reward","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,
      actor,
      critic,
      max_action,
      alpha=0.2,
      gamma=None,
      tau=None,
      actor_lr=None,
      critic_lr=None,
  ):
      """SAC algorithm
  
      Args:
          actor (parl.Model): forward network of actor.
          critic (patl.Model): forward network of the critic.
          max_action (float): the largest value that an action can be, env.action_space.high[0]
          alpha (float): Temperature parameter determines the relative importance of the entropy against the reward
          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
      """
      assert isinstance(gamma, float)
      assert isinstance(tau, float)
      assert isinstance(actor_lr, float)
      assert isinstance(critic_lr, float)
      assert isinstance(alpha, float)
      self.max_action = max_action
      self.gamma = gamma
      self.tau = tau
      self.actor_lr = actor_lr
      self.critic_lr = critic_lr
  
      self.alpha = alpha
  
      self.actor = actor
      self.critic = critic
      self.target_critic = deepcopy(critic)
  
file_path: PARL/parl/algorithms/fluid/sac.py
imports: from parl.core.fluid import layers
  from copy import deepcopy
  import numpy
  from paddle import fluid
  from paddle.fluid.layers import Normal
  from parl.core.fluid.algorithm import Algorithm
label_desc: Use image node_id 1 to create a new SAC object from inherited base classes: Algorithm with example: obj = SAC(actor, critic, max_action, alpha, gamma, tau, actor_lr, critic_lr)