class_docstr: Generic loss function applied to structured outputs.
class_docstr_tok: ["Generic","loss","function","applied","to","structured","outputs","."]
code: def __init__(self, config, ignore_index=1):
      self.ignore_index = ignore_index
  
file_path: pytext/pytext/loss/structured_loss.py
imports: from enum import Enum
  from typing import Union
  import torch
  import torch.nn.functional
  from pytext.config import ConfigBase
  from pytext.config.component import create_loss
  from .loss import HingeLoss, Loss, NLLLoss
label_desc: Use image node_id 1 to create a new StructuredLoss object from inherited base classes: Loss with example: obj = StructuredLoss(config, ignore_index)