docstr: Policy Gradient algorithm
  
  Args:
      model (parl.Model): policy的前向网络.
      lr (float): 学习率.
docstr_tok: ["Policy","Gradient","algorithm","Args",":","model","(","parl.Model",")",":","policy\u7684\u524d\u5411\u7f51\u7edc",".","lr","(","float",")",":","\u5b66\u4e60\u7387","."]
code: def __init__(self, model, lr=None):
      """Policy Gradient algorithm
  
      Args:
          model (parl.Model): policy的前向网络.
          lr (float): 学习率.
      """
  
      self.model = model
      assert isinstance(lr, float)
      self.lr = lr
  
file_path: PARL/examples/tutorials/lesson4/policy_gradient/algorithm.py
imports: import paddle.fluid
  import parl
  from parl import layers
label_desc: Use image node_id 1 to create a new PolicyGradient object from inherited base classes: parl with example: obj = PolicyGradient(model, lr)