class_docstr: Callback that standardizes the image-level and pixel-level anomaly scores.
class_docstr_tok: ["Callback","that","standardizes","the","image-level","and","pixel-level","anomaly","scores","."]
docstr: Called when the validation starts after training.
  
  Use the current model to compute the anomaly score distributions
  of the normal training data. This is needed after every epoch, because the statistics must be
  stored in the state dict of the checkpoint file.
docstr_tok: ["Called","when","the","validation","starts","after","training",".","Use","the","current","model","to","compute","the","anomaly","score","distributions","of","the","normal","training","data",".","This","is","needed","after","every","epoch",",","because","the","statistics","must","be","stored","in","the","state","dict","of","the","checkpoint","file","."]
code: def on_validation_epoch_start(
      self, trainer: pl.Trainer, pl_module: AnomalyModule
  ) -> None:
      """Called when the validation starts after training.
  
      Use the current model to compute the anomaly score distributions
      of the normal training data. This is needed after every epoch, because the statistics must be
      stored in the state dict of the checkpoint file.
      """
      logger.info(
          "Collecting the statistics of the normal training data to normalize the scores."
      )
      self._collect_stats(trainer, pl_module)
  
imports: from __future__ import annotations
  import logging
  from typing import Any
  import pytorch_lightning
  from pytorch_lightning import Callback, Trainer
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch.distributions import LogNormal
  from anomalib.models import get_model
  from anomalib.models.components import AnomalyModule
  from anomalib.post_processing.normalization.cdf import normalize, standardize
  from anomalib.utils.metrics import AnomalyScoreDistribution
label_desc: Use image node_id 4 for calling the CdfNormalizationCallback obj's underlying member method code with example usage: obj.on_validation_epoch_start(trainer, pl_module) without return types