class_docstr: DSR: A Dual Subspace Re-Projection Network for Surface Anomaly Detection
  
  Args:
      latent_anomaly_strength (float, optional): Strength of the generated anomalies in the latent space.
code: def __init__(self, latent_anomaly_strength: float = 0.2) -> None:
      super().__init__()
  
      self.automatic_optimization = False
  
      self.quantized_anomaly_generator = DsrAnomalyGenerator()
      self.perlin_generator = Augmenter()
      self.model = DsrModel(latent_anomaly_strength)
      self.second_stage_loss = DsrSecondStageLoss()
      self.third_stage_loss = DsrThirdStageLoss()
  
      self.second_phase: int
  
imports: from __future__ import annotations
  import logging
  from pathlib import Path
  import torch
  from omegaconf import DictConfig, ListConfig
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch import Tensor
  from anomalib.data.utils import DownloadInfo, download_and_extract
  from anomalib.data.utils.augmenter import Augmenter
  from anomalib.models.components import AnomalyModule
  from anomalib.models.dsr.anomaly_generator import DsrAnomalyGenerator
  from anomalib.models.dsr.loss import DsrSecondStageLoss, DsrThirdStageLoss
  from anomalib.models.dsr.torch_model import DsrModel
label_desc: Use image node_id 1 to create a new Dsr object from inherited base classes: AnomalyModule with example: obj = Dsr(latent_anomaly_strength)