class_docstr: Network layers with biases should not be combined with normalization layers,
  as the bias makes normalization ineffective and can lead to unstable training.
  This verification detects such combinations.
class_docstr_tok: ["Network","layers","with","biases","should","not","be","combined","with","normalization","layers",",","as","the","bias","makes","normalization","ineffective","and","can","lead","to","unstable","training",".","This","verification","detects","such","combinations","."]
code: def collect_detections(self):
      detected_pairs = []
      for (name0, mod0), (name1, mod1) in zip(
          self._module_sequence[:-1], self._module_sequence[1:]
      ):
          bias = getattr(mod0, "bias", None)
          detected = (
              isinstance(mod1, self.normalization_layers)
              and mod1.training
              and isinstance(bias, torch.Tensor)
              and bias.requires_grad
          )
          if detected:
              detected_pairs.append((name0, name1))
      self._detected_pairs = detected_pairs
      if detected_pairs:
          logger.warning(self._verification_message())
      return detected_pairs
  
file_path: allennlp/allennlp/confidence_checks/normalization_bias_verification.py
imports: import torch
  from torch import nn
  from typing import Tuple, List, Callable
  from allennlp.confidence_checks.verification_base import VerificationBase
  import logging
label_desc: Use image node_id 4 for calling the NormalizationBiasVerification obj's underlying member method code with example usage: obj.collect_detections() and returns: detected_pairs