class_docstr: Encapsulates model + loss + optimizer + metrics in a PL module
class_docstr_tok: ["Encapsulates","model","+","loss","+","optimizer","+","metrics","in","a","PL","module"]
code: def __init__(self, model: VCTPipeline, cfg: DictConfig) -> None:
      super().__init__()
      self.model = model
      self.cfg_optim = getattr(cfg, "optim", None)
      self.cfg_scheduler = getattr(cfg, "scheduler", None)
      self.lr_annealing_frequency = getattr(
          getattr(cfg, "training_loop", None),
          "lr_annealing_frequency",
          None,
      )
      self._distortion_loss_scaling = getattr(
          getattr(cfg, "training_loop", None), "distortion_lambda", None
      )
      if self._distortion_loss_scaling is not None:
          self._distortion_loss_scaling = (
              self._distortion_loss_scaling * (255**2)
          )
  
imports: from typing import Any, List, Optional, Tuple, Union
  import hydra
  import pytorch_lightning
  import torch
  import torch.nn.functional
  from datamodules.video_data_api import VideoData
  from model_pipeline import VCTPipeline
  from omegaconf import DictConfig
  from torch import Tensor
  from torchmetrics.functional import peak_signal_noise_ratio
  from utils.hydra_tools import OmegaConf
label_desc: Use image node_id 1 to create a new VCTModule object from inherited base classes: pytorch_lightning with example: obj = VCTModule(model, cfg)