class_docstr: Categorical distribution with noise for discrete action spaces
class_docstr_tok: ["Categorical","distribution","with","noise","for","discrete","action","spaces"]
docstr: Returns:
      sample_action: An int64 tensor with shape [BATCH_SIZE, NUM_ACTIOINS] of sample action,
                     with noise to keep the target close to the original action.
docstr_tok: ["Returns",":","sample_action",":","An","int64","tensor","with","shape","[","BATCH_SIZE",",","NUM_ACTIOINS","]","of","sample","action",",","with","noise","to","keep","the","target","close","to","the","original","action","."]
code: def sample(self):
      """
      Returns:
          sample_action: An int64 tensor with shape [BATCH_SIZE, NUM_ACTIOINS] of sample action,
                         with noise to keep the target close to the original action.
      """
      eps = 1e-4
      uniform = torch.rand_like(self.logits)
      soft_uniform = torch.log(-1.0 * torch.log(uniform))
      return F.softmax(self.logits - soft_uniform, dim=-1)
  
imports: import torch
  import torch.nn.functional
  import numpy
label_desc: Use image node_id 2 for calling the SoftCategoricalDistribution obj's underlying member method code with example usage: obj.sample() and returns: F