code: def gaussian_loss(y_hat, y, log_std_min=-7.0):
      assert y_hat.dim() == 3
      assert y_hat.size(2) == 2
      mean = y_hat[:, :, :1]
      log_std = torch.clamp(y_hat[:, :, 1:], min=log_std_min)
      # TODO: replace with pytorch dist
      log_probs = -0.5 * (
          -math.log(2.0 * math.pi)
          - 2.0 * log_std
          - torch.pow(y - mean, 2) * torch.exp((-2.0 * log_std))
      )
      return log_probs.squeeze().mean()
  
file_path: TTS/TTS/vocoder/utils/distribution.py
imports: import numpy
  import math
  import torch
  from torch.distributions.normal import Normal
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: gaussian_loss(y_hat, y, log_std_min) and returns: log_probs