class_docstr: Tanh-squashed diagonal Gaussian (Normal) Torch probability distribution.
  
  :param logits: the logits for both mean and standard deviation.
  :param action_space: the underlying gym.spaces action space.
class_docstr_tok: ["Tanh-squashed","diagonal","Gaussian","(","Normal",")","Torch","probability","distribution",".",":","param","logits",":","the","logits","for","both","mean","and","standard","deviation",".",":","param","action_space",":","the","underlying","gym.spaces","action","space","."]
code: def __init__(
      self,
      logits: torch.Tensor,
      action_space: gym.spaces.Box,
      temperature: float,
  ):
      # make sure space bounds are set properly
      assert np.all(action_space.low > -np.inf) and np.all(
          action_space.low < np.inf
      )
  
      # create low and high tensors for vectorized clamping
      self.low = convert_to_torch(
          action_space.low,
          device=logits.device,
          cast=logits.dtype,
          in_place=False,
      )
      self.high = convert_to_torch(
          action_space.high,
          device=logits.device,
          cast=logits.dtype,
          in_place=False,
      )
  
      # split distribution parameters
      mean, log_std = torch.chunk(logits, 2, dim=-1)
  
      # apply the temperature to the standard deviation
      log_std = log_std / temperature
  
      # transform to reasonable range
      log_std = torch.clamp(
          log_std, MIN_LOG_NN_OUTPUT, MAX_LOG_NN_OUTPUT
      )
      std = torch.exp(log_std)
  
      super().__init__(
          dist=Normal(mean, std), action_space=action_space
      )
  
file_path: maze/maze/distributions/squashed_gaussian.py
imports: from typing import Sequence
  import numpy
  import gym
  import torch
  from torch.distributions import Normal, kl_divergence
  from maze.core.annotations import override
  from maze.distributions.torch_dist import TorchProbabilityDistribution
  from maze.distributions.utils import MIN_LOG_NN_OUTPUT, MAX_LOG_NN_OUTPUT, EPSILON, tensor_clamp, atanh
  from maze.perception.perception_utils import convert_to_torch
label_desc: Use image node_id 2 to create a new SquashedGaussianProbabilityDistribution object from inherited base classes: TorchProbabilityDistribution with example: obj = SquashedGaussianProbabilityDistribution(logits, action_space, temperature)