docstr: Gaussian Mixture Model (GMM).
  
  Parameters
  ----------
  n_components
      The number of mixture components.
  dim
      The dimensionality of the data.
docstr_tok: ["Gaussian","Mixture","Model","(","GMM",")",".","Parameters","--","--","--","--","--","n_components","The","number","of","mixture","components",".","dim","The","dimensionality","of","the","data","."]
code: def __init__(self, n_components: int, dim: int) -> None:
      """Gaussian Mixture Model (GMM).
  
      Parameters
      ----------
      n_components
          The number of mixture components.
      dim
          The dimensionality of the data.
      """
      super().__init__()
      self.weight_logits = nn.Parameter(torch.zeros(n_components))
      self.means = nn.Parameter(torch.randn(n_components, dim))
      self.inv_cov_factor = nn.Parameter(
          torch.randn(n_components, dim, dim) / 10
      )
  
imports: from torch import nn
  import torch
label_desc: Use image node_id 1 to create a new GMMModel object from inherited base classes: nn with example: obj = GMMModel(n_components, dim)