class_docstr: DRÆM: A discriminatively trained reconstruction embedding for surface anomaly detection.
  
  Args:
      anomaly_source_path (str | None): Path to folder that contains the anomaly source images. Random noise will
          be used if left empty.
class_docstr_tok: ["DR\u00c6M",":","A","discriminatively","trained","reconstruction","embedding","for","surface","anomaly","detection",".","Args",":","anomaly_source_path","(","str","|","None",")",":","Path","to","folder","that","contains","the","anomaly","source","images",".","Random","noise","will","be","used","if","left","empty","."]
code: def __init__(
      self,
      enable_sspcab: bool = False,
      sspcab_lambda: float = 0.1,
      anomaly_source_path: str | None = None,
      beta: float | tuple[float, float] = (0.1, 1.0),
  ) -> None:
      super().__init__()
  
      self.augmenter = Augmenter(anomaly_source_path, beta=beta)
      self.model = DraemModel(sspcab=enable_sspcab)
      self.loss = DraemLoss()
      self.sspcab = enable_sspcab
  
      if self.sspcab:
          self.sspcab_activations: dict = {}
          self.setup_sspcab()
          self.sspcab_loss = nn.MSELoss()
          self.sspcab_lambda = sspcab_lambda
  
imports: from __future__ import annotations
  from typing import Callable
  import torch
  from omegaconf import DictConfig, ListConfig
  from pytorch_lightning.callbacks import EarlyStopping
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch import Tensor, nn
  from anomalib.data.utils import Augmenter
  from anomalib.models.components import AnomalyModule
  from anomalib.models.draem.loss import DraemLoss
  from anomalib.models.draem.torch_model import DraemModel
label_desc: Use image node_id 1 to create a new Draem object from inherited base classes: AnomalyModule with example: obj = Draem(enable_sspcab, sspcab_lambda, anomaly_source_path, beta)