class_docstr: Wrapper class to apply bias mitigation to any pretrained Model.
  
  # Parameters
  
  vocab : `Vocabulary`
      Vocabulary of base model.
  base_model : `Model`
      Base model for which to mitigate biases.
  bias_mitigator : `Lazy[BiasMitigatorWrapper]`
      Bias mitigator to apply to base model.
class_docstr_tok: ["Wrapper","class","to","apply","bias","mitigation","to","any","pretrained","Model",".","#","Parameters","vocab",":","`","Vocabulary","`","Vocabulary","of","base","model",".","base_model",":","`","Model","`","Base","model","for","which","to","mitigate","biases",".","bias_mitigator",":","`","Lazy","[","BiasMitigatorWrapper","]","`","Bias","mitigator","to","apply","to","base","model","."]
code: def __init__(
      self,
      vocab: Vocabulary,
      base_model: Model,
      bias_mitigator: Lazy[BiasMitigatorWrapper],
      **kwargs,
  ):
      super().__init__(vocab, **kwargs)
  
      self.base_model = base_model
      # want to keep bias mitigation hook during test time
      embedding_layer = find_embedding_layer(self.base_model)
  
      self.bias_mitigator = bias_mitigator.construct(
          embedding_layer=embedding_layer
      )
      embedding_layer.register_forward_hook(self.bias_mitigator)
  
      self.vocab = self.base_model.vocab
      self._regularizer = self.base_model._regularizer
  
file_path: allennlp/allennlp/fairness/bias_mitigator_applicator.py
imports: from allennlp.fairness.bias_mitigator_wrappers import BiasMitigatorWrapper
  from allennlp.common.lazy import Lazy
  from allennlp.data import Vocabulary
  from allennlp.models import Model
  from allennlp.nn.util import find_embedding_layer
label_desc: Use image node_id 1 to create a new BiasMitigatorApplicator object from inherited base classes: Model with example: obj = BiasMitigatorApplicator(vocab, base_model, bias_mitigator)