class_docstr: DiagGaussian distribution for continuous action spaces.
class_docstr_tok: ["DiagGaussian","distribution","for","continuous","action","spaces","."]
docstr: Args:
      actions: An float32 tensor with shape [BATCH_SIZE, NUM_ACTIOINS]
  
  Returns:
      actions_log_prob: A float32 tensor with shape [BATCH_SIZE]
docstr_tok: ["Args",":","actions",":","An","float32","tensor","with","shape","[","BATCH_SIZE",",","NUM_ACTIOINS","]","Returns",":","actions_log_prob",":","A","float32","tensor","with","shape","[","BATCH_SIZE","]"]
code: def logp(self, actions):
      """
      Args:
          actions: An float32 tensor with shape [BATCH_SIZE, NUM_ACTIOINS]
  
      Returns:
          actions_log_prob: A float32 tensor with shape [BATCH_SIZE]
      """
      assert len(actions.shape) == 2
  
      norm_actions = paddle.sum(
          paddle.square((actions - self.mean) / self.std), axis=1
      )
      pi_item = 0.5 * np.log(2.0 * np.pi) * actions.shape[1]
      actions_log_prob = (
          -0.5 * norm_actions
          - pi_item
          - paddle.sum(self.logstd, axis=1)
      )
  
      return actions_log_prob
  
imports: import paddle
  import paddle.nn.functional
  import numpy
label_desc: Use image node_id 4 for calling the DiagGaussianDistribution obj's underlying member method code with example usage: obj.logp(actions) and returns: actions_log_prob