code: def __init__(
      self,
      *,
      kld_ema: float = 0.999,
      kld_weight: float = 1.0e-3,
  ):
      super().__init__()
      self.kld_ema = kld_ema
      self.kld_weight = kld_weight
      self.register_buffer(
          "kld_w", torch.tensor([0.0], dtype=torch.float32)
      )
  
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 VAELoss object from inherited base classes: ILoss with example: obj = VAELoss()