docstr: PopArt layer use running mean and std to normalize rewards.
       The PopArt code is mainly referenced and copied from https://github.com/marlbenchmark/on-policy/blob/main/onpolicy/algorithms/utils/popart.py
  
  Args:
      weight (Parameter): output layer weight of critic net
      bias (Parameter): output layer bias of critic net
      norm_axes (float): the number of groups to separate the channels into
      beta (float): the fixed decay rate determining the horizon used to compute the statistics
      epsilon (float): the epsilon value to use to avoid division by zero
docstr_tok: ["PopArt","layer","use","running","mean","and","std","to","normalize","rewards",".","The","PopArt","code","is","mainly","referenced","and","copied","from","https",":","\/\/github.com\/marlbenchmark\/on-policy\/blob\/main\/onpolicy\/algorithms\/utils\/popart.py","Args",":","weight","(","Parameter",")",":","output","layer","weight","of","critic","net","bias","(","Parameter",")",":","output","layer","bias","of","critic","net","norm_axes","(","float",")",":","the","number","of","groups","to","separate","the","channels","into","beta","(","float",")",":","the","fixed","decay","rate","determining","the","horizon","used","to","compute","the","statistics","epsilon","(","float",")",":","the","epsilon","value","to","use","to","avoid","division","by","zero"]
code: def __init__(
      self, weight, bias, norm_axes=1, beta=0.99999, epsilon=1e-5
  ):
      """PopArt layer use running mean and std to normalize rewards.
           The PopArt code is mainly referenced and copied from https://github.com/marlbenchmark/on-policy/blob/main/onpolicy/algorithms/utils/popart.py
  
      Args:
          weight (Parameter): output layer weight of critic net
          bias (Parameter): output layer bias of critic net
          norm_axes (float): the number of groups to separate the channels into
          beta (float): the fixed decay rate determining the horizon used to compute the statistics
          epsilon (float): the epsilon value to use to avoid division by zero
      """
      super(PopArt, self).__init__()
      self.beta = beta
      self.epsilon = epsilon
      self.norm_axes = norm_axes
      self.tpdv = dict(
          dtype=torch.float32,
          device=torch.device(
              "cuda:0" if torch.cuda.is_available() else "cpu"
          ),
      )
  
      self.weight = weight
      self.bias = bias
      output_shape = 1
  
      self.stddev = nn.Parameter(
          torch.ones(output_shape), requires_grad=False
      ).to(**self.tpdv)
      self.mean = nn.Parameter(
          torch.zeros(output_shape), requires_grad=False
      ).to(**self.tpdv)
      self.mean_sq = nn.Parameter(
          torch.zeros(output_shape), requires_grad=False
      ).to(**self.tpdv)
      self.debiasing_term = nn.Parameter(
          torch.tensor(0.0), requires_grad=False
      ).to(**self.tpdv)
  
      self.reset_parameters()
  
imports: import torch
  import torch.nn
  from torch.distributions import Categorical
  import numpy
  import parl
label_desc: Use image node_id 1 to create a new PopArt object from inherited base classes: torch.nn with example: obj = PopArt(weight, bias, norm_axes, beta, epsilon)