docstr: Args:
      logits: A float32 tensor of shape [B, NUM_ACTIONS]
      actions: An int64 tensor of shape [B].
  
  Returns:
      actions_log_probs: A
docstr_tok: ["Args",":","logits",":","A","float32","tensor","of","shape","[","B",",","NUM_ACTIONS","]","actions",":","An","int64","tensor","of","shape","[","B","]",".","Returns",":","actions_log_probs",":","A"]
code: def _log_prob(self, logits, actions):
      """
      Args:
          logits: A float32 tensor of shape [B, NUM_ACTIONS]
          actions: An int64 tensor of shape [B].
  
      Returns:
          actions_log_probs: A
      """
      act_dim = logits.shape[-1]
      actions_onehot = F.one_hot(actions, act_dim)
      actions_log_probs = paddle.sum(
          F.log_softmax(logits) * actions_onehot, axis=-1
      )
      return actions_log_probs
  
file_path: PARL/parl/algorithms/paddle/impala/impala.py
imports: import parl
  import paddle
  import paddle.nn.functional
  from paddle.distribution import Categorical
  from parl.algorithms.paddle.impala import vtrace
label_desc: Use image node_id 2 for calling the IMPALA obj's underlying member method code with example usage: obj._log_prob(logits, actions) and returns: actions_log_probs