class_docstr: Emission Model of the HMM, it represents the probability of
  emitting an observation based on the current state
class_docstr_tok: ["Emission","Model","of","the","HMM",",","it","represents","the","probability","of","emitting","an","observation","based","on","the","current","state"]
docstr: Calculates the log probability of the the given data (x_t)
      being observed from states with given means and stds
  Args:
      x_t (float tensor) : observation at current time step
          - shape: (batch, feature_dim)
      means (float tensor): means of the distributions of hidden states
          - shape: (batch, hidden_state, feature_dim)
      stds (float tensor): standard deviations of the distributions of the hidden states
          - shape: (batch, hidden_state, feature_dim)
      state_lengths (int tensor): Lengths of states in a batch
          - shape: (batch)
  
  Returns:
      out (float tensor): observation log likelihoods,
                              expressing the probability of an observation
          being generated from a state i
          shape: (batch, hidden_state)
docstr_tok: ["Calculates","the","log","probability","of","the","the","given","data","(","x_t",")","being","observed","from","states","with","given","means","and","stds","Args",":","x_t","(","float","tensor",")",":","observation","at","current","time","step","-","shape",":","(","batch",",","feature_dim",")","means","(","float","tensor",")",":","means","of","the","distributions","of","hidden","states","-","shape",":","(","batch",",","hidden_state",",","feature_dim",")","stds","(","float","tensor",")",":","standard","deviations","of","the","distributions","of","the","hidden","states","-","shape",":","(","batch",",","hidden_state",",","feature_dim",")","state_lengths","(","int","tensor",")",":","Lengths","of","states","in","a","batch","-","shape",":","(","batch",")","Returns",":","out","(","float","tensor",")",":","observation","log","likelihoods",",","expressing","the","probability","of","an","observation","being","generated","from","a","state","i","shape",":","(","batch",",","hidden_state",")"]
code: def forward(self, x_t, means, stds, state_lengths):
      r"""Calculates the log probability of the the given data (x_t)
          being observed from states with given means and stds
      Args:
          x_t (float tensor) : observation at current time step
              - shape: (batch, feature_dim)
          means (float tensor): means of the distributions of hidden states
              - shape: (batch, hidden_state, feature_dim)
          stds (float tensor): standard deviations of the distributions of the hidden states
              - shape: (batch, hidden_state, feature_dim)
          state_lengths (int tensor): Lengths of states in a batch
              - shape: (batch)
  
      Returns:
          out (float tensor): observation log likelihoods,
                                  expressing the probability of an observation
              being generated from a state i
              shape: (batch, hidden_state)
      """
      emission_dists = self.distribution_function(means, stds)
      out = emission_dists.log_prob(x_t.unsqueeze(1))
      state_lengths_mask = sequence_mask(state_lengths).unsqueeze(2)
      out = torch.sum(out * state_lengths_mask, dim=2)
      return out
  
imports: from typing import List
  import torch
  import torch.distributions
  import torch.nn.functional
  from torch import nn
  from torch.utils.checkpoint import checkpoint
  from TTS.tts.layers.overflow.common_layers import Outputnet, OverflowUtils
  from TTS.tts.layers.tacotron.common_layers import Prenet
  from TTS.tts.utils.helpers import sequence_mask
label_desc: Use image node_id 3 for calling the EmissionModel obj's underlying member method code with example usage: obj.forward(x_t, means, stds, state_lengths) and returns: out