class_docstr: PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization.
  
  Args:
      hparams (DictConfig | ListConfig): Model params
class_docstr_tok: ["PaDiM",":","a","Patch","Distribution","Modeling","Framework","for","Anomaly","Detection","and","Localization",".","Args",":","hparams","(","DictConfig","|","ListConfig",")",":","Model","params"]
code: def __init__(self, hparams: DictConfig | ListConfig) -> None:
      super().__init__(
          input_size=hparams.model.input_size,
          layers=hparams.model.layers,
          backbone=hparams.model.backbone,
          pre_trained=hparams.model.pre_trained,
          n_features=hparams.model.n_features
          if "n_features" in hparams.model
          else None,
      )
      self.hparams: DictConfig | ListConfig  # type: ignore
      self.save_hyperparameters(hparams)
  
file_path: anomalib/src/anomalib/models/padim/lightning_model.py
imports: from __future__ import annotations
  import logging
  import torch
  from omegaconf import DictConfig, ListConfig
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch import Tensor
  from anomalib.models.components import AnomalyModule
  from anomalib.models.padim.torch_model import PadimModel
label_desc: Use image node_id 1 to create a new PadimLightning object from inherited base classes: Padim with example: obj = PadimLightning(hparams)