code: def __init__(
      self,
      *,
      lb_vq: float = 1.0,
      lb_recon: float = 1.0,
      lb_commit: float = 1.0,
      loss_type: str = "l2",
  ):
      super().__init__()
      self.lb_vq = lb_vq
      self.lb_recon = lb_recon
      self.lb_commit = lb_commit
      self.loss_type = loss_type
  
file_path: carefree-learn/cflearn/losses/vae.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from typing import Optional
  from cftool.types import tensor_dict_type
  from ..types import losses_type
  from ..schema import ILoss
  from ..schema import TrainerState
  from ..constants import LOSS_KEY
  from ..constants import INPUT_KEY
  from ..constants import PREDICTIONS_KEY
label_desc: Use image node_id 1 to create a new VQVAELoss object from inherited base classes: ILoss with example: obj = VQVAELoss()