class_docstr: Applies regularizers to the parameters of a Module based on regex matches.
docstr: Parameters
  ----------
  module : torch.nn.Module, required
      The module to regularize.
docstr_tok: ["Parameters","--","--","--","--","--","module",":","torch.nn.Module",",","required","The","module","to","regularize","."]
code: def __call__(self, module):
      """
      Parameters
      ----------
      module : torch.nn.Module, required
          The module to regularize.
      """
      accumulator = 0.0
      # For each parameter find the first matching regex.
      for name, parameter in module.named_parameters():
          for regex, regularizer in self._regularizers:
              if re.search(regex, name):
                  penalty = regularizer(parameter)
                  accumulator = accumulator + penalty
                  break
  
      return accumulator
  
file_path: magnitude/pymagnitude/third_party/allennlp/nn/regularizers/regularizer_applicator.py
imports: from __future__ import absolute_import
  import re
  import torch
  from allennlp.common.params import Params
  from allennlp.nn.regularizers.regularizer import Regularizer
label_desc: Use image node_id 2 for calling the RegularizerApplicator obj's underlying member method code with example usage: obj.__call__(module) and returns: accumulator