class_docstr: PL Lightning Module for Reverse Distillation Algorithm.
  
  Args:
      input_size (tuple[int, int]): Size of model input
      backbone (str): Backbone of CNN network
      layers (list[str]): Layers to extract features from the backbone CNN
      pre_trained (bool, optional): Boolean to check whether to use a pre_trained backbone.
class_docstr_tok: ["PL","Lightning","Module","for","Reverse","Distillation","Algorithm",".","Args",":","input_size","(","tuple","[","int",",","int","]",")",":","Size","of","model","input","backbone","(","str",")",":","Backbone","of","CNN","network","layers","(","list","[","str","]",")",":","Layers","to","extract","features","from","the","backbone","CNN","pre_trained","(","bool",",","optional",")",":","Boolean","to","check","whether","to","use","a","pre_trained","backbone","."]
code: def __init__(
      self,
      input_size: tuple[int, int],
      backbone: str,
      layers: list[str],
      anomaly_map_mode: AnomalyMapGenerationMode,
      lr: float,
      beta1: float,
      beta2: float,
      pre_trained: bool = True,
  ) -> None:
      super().__init__()
      self.model = ReverseDistillationModel(
          backbone=backbone,
          pre_trained=pre_trained,
          layers=layers,
          input_size=input_size,
          anomaly_map_mode=anomaly_map_mode,
      )
      self.loss = ReverseDistillationLoss()
      # TODO: LR should be part of optimizer in config.yaml! Since reverse distillation has custom
      #   optimizer this is to be addressed later.
      self.learning_rate = lr
      self.beta1 = beta1
      self.beta2 = beta2
  
file_path: anomalib/src/anomalib/models/reverse_distillation/lightning_model.py
imports: from __future__ import annotations
  from omegaconf import DictConfig, ListConfig
  from pytorch_lightning.callbacks import EarlyStopping
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch import Tensor, optim
  from anomalib.models.components import AnomalyModule
  from .anomaly_map import AnomalyMapGenerationMode
  from .loss import ReverseDistillationLoss
  from .torch_model import ReverseDistillationModel
label_desc: Use image node_id 1 to create a new ReverseDistillation object from inherited base classes: AnomalyModule with example: obj = ReverseDistillation(input_size, backbone, layers, anomaly_map_mode, lr, beta1, beta2, pre_trained)