class_docstr: A mixture of SequenceLoss and CrossEntropyLoss.
  Loss = SequenceLoss + alpha * CELoss
class_docstr_tok: ["A","mixture","of","SequenceLoss","and","CrossEntropyLoss",".","Loss","=","SequenceLoss","+","alpha","*","CELoss"]
code: def __init__(self, vocab_size, alpha):
      super().__init__()
      self.seq_loss = SequenceLoss(vocab_size)
      self.ce_loss = nn.CrossEntropyLoss()
      assert alpha >= 0
      self.alpha = alpha
  
file_path: stanza/stanza/models/common/loss.py
imports: import logging
  import numpy
  import torch
  import torch.nn
  import stanza.models.common.seq2seq_constant
label_desc: Use image node_id 1 to create a new MixLoss object from inherited base classes: nn with example: obj = MixLoss(vocab_size, alpha)