docstr: Policy Gradient algorithm
  
  Args:
      model (parl.Model): policy的前向网络.
      lr (float): 学习率.
code: def __init__(self, model, lr):
      """Policy Gradient algorithm
  
      Args:
          model (parl.Model): policy的前向网络.
          lr (float): 学习率.
      """
      assert isinstance(lr, float)
  
      self.model = model
      self.optimizer = paddle.optimizer.Adam(
          learning_rate=lr, parameters=self.model.parameters()
      )
  
file_path: PARL/examples/tutorials/parl2_dygraph/lesson4/policy_gradient/algorithm.py
imports: import parl
  import paddle
  from paddle.distribution import Categorical
  import paddle.nn.functional
label_desc: Use image node_id 1 to create a new PolicyGradient object from inherited base classes: parl with example: obj = PolicyGradient(model, lr)