class_docstr: Generic regularization function to be added to a surrogate loss (e.g., cross-entropy).
class_docstr_tok: ["Generic","regularization","function","to","be","added","to","a","surrogate","loss","(","e.g.",",","cross-entropy",")","."]
code: def __init__(self, config, ignore_index=1):
      self.ignore_index = ignore_index
  
file_path: pytext/pytext/loss/regularizer.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from pytext.config import ConfigBase
  from .loss import Loss
label_desc: Use image node_id 1 to create a new Regularizer object from inherited base classes: Loss with example: obj = Regularizer(config, ignore_index)