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","."]
code: def _normalize_batch(
      outputs: STEP_OUTPUT, pl_module: AnomalyModule
  ) -> None:
      outputs["pred_scores"] = normalize(
          outputs["pred_scores"], pl_module.image_threshold.value
      )
      if "anomaly_maps" in outputs.keys():
          outputs["anomaly_maps"] = normalize(
              outputs["anomaly_maps"], pl_module.pixel_threshold.value
          )
          outputs["anomaly_maps"] = normalize(
              outputs["anomaly_maps"], pl_module.pixel_threshold.value
          )
  
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 11 for calling the CdfNormalizationCallback obj's underlying member method code with example usage: obj._normalize_batch(outputs, pl_module) without return types