docstr: Policy gradient algorithm
  
  Args:
      model (parl.Model): model defining forward network of policy.
      lr (float): learning rate.
code: def __init__(self, model, lr):
      """Policy gradient algorithm
  
      Args:
          model (parl.Model): model defining forward network of policy.
          lr (float): learning rate.
  
      """
      # checks
      check_model_method(model, "forward", self.__class__.__name__)
      assert isinstance(lr, float)
  
      self.model = model
      self.optimizer = paddle.optimizer.Adam(
          learning_rate=lr, parameters=self.model.parameters()
      )
  
file_path: PARL/parl/algorithms/paddle/policy_gradient.py
imports: import parl
  import paddle
  from paddle.distribution import Categorical
  from parl.utils.utils import check_model_method
label_desc: Use image node_id 1 to create a new PolicyGradient object from inherited base classes: parl with example: obj = PolicyGradient(model, lr)