class_docstr: A max entropy loss that encourage the model to have large entropy,
  therefore giving more diverse outputs.
  
  Loss = NLLLoss + alpha * EntropyLoss
class_docstr_tok: ["A","max","entropy","loss","that","encourage","the","model","to","have","large","entropy",",","therefore","giving","more","diverse","outputs",".","Loss","=","NLLLoss","+","alpha","*","EntropyLoss"]
code: def __init__(self, vocab_size, alpha):
      super().__init__()
      weight = torch.ones(vocab_size)
      weight[constant.PAD_ID] = 0
      self.nll = nn.NLLLoss(weight)
      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 MaxEntropySequenceLoss object from inherited base classes: nn with example: obj = MaxEntropySequenceLoss(vocab_size, alpha)