class_docstr: Gaussian head with state-independent learned covariance.
  
  This link is intended to be attached to a neural network that outputs
  the mean of a Gaussian policy. The only learnable parameter this link has
  determines the variance in a state-independent way.
  
  State-independent parameterization of the variance of a Gaussian policy
  is often used with PPO and TRPO, e.g., in https://arxiv.org/abs/1709.06560.
  
  Args:
      action_size (int): Number of dimensions of the action space.
      var_type (str): Type of parameterization of variance. It must be
          'spherical' or 'diagonal'.
      var_func (callable): Callable that computes the variance from the var
          parameter. It should always return positive values.
      var_param_init (float): Initial value the var parameter.
code: def __init__(
      self,
      action_size,
      var_type="spherical",
      var_func=nn.functional.softplus,
      var_param_init=0,
  ):
      super().__init__()
  
      self.var_func = var_func
      var_size = {"spherical": 1, "diagonal": action_size}[var_type]
  
      self.var_param = nn.Parameter(
          torch.tensor(
              np.broadcast_to(var_param_init, var_size),
              dtype=torch.float,
          )
      )
  
file_path: pfrl/pfrl/policies/gaussian_policy.py
imports: import numpy
  import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new GaussianHeadWithStateIndependentCovariance object from inherited base classes: nn with example: obj = GaussianHeadWithStateIndependentCovariance(action_size, var_type, var_func, var_param_init)