code: def __init__(self, model_config: VQVAEConfig):
      nn.Module.__init__(self)
  
      self.model_config = model_config
  
      self.embedding_dim = model_config.embedding_dim
      self.num_embeddings = model_config.num_embeddings
      self.commitment_loss_factor = model_config.commitment_loss_factor
      self.decay = model_config.decay
  
      embeddings = torch.empty(self.num_embeddings, self.embedding_dim)
  
      embeddings.data.uniform_(
          -1 / self.num_embeddings, 1 / self.num_embeddings
      )
  
      self.register_buffer(
          "cluster_size", torch.zeros(self.num_embeddings)
      )
      self.register_buffer(
          "ema_embed",
          torch.zeros(self.num_embeddings, self.embedding_dim),
      )
      self.ema_embed.data.uniform_(
          -1 / self.num_embeddings, 1 / self.num_embeddings
      )
  
      self.register_buffer("embeddings", embeddings)
  
file_path: benchmark_VAE/src/pythae/models/vq_vae/vq_vae_utils.py
imports: import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  from ..base.base_utils import ModelOutput
  from .vq_vae_config import VQVAEConfig
label_desc: Use image node_id 1 to create a new QuantizerEMA object from inherited base classes: nn with example: obj = QuantizerEMA(model_config)