code: def __init__(self, cutoffs):
      super().__init__()
      self.cutoffs = cutoffs
      self.criterions = nn.ModuleList()
      for i in self.cutoffs:
          self.criterions.append(
              nn.CrossEntropyLoss(size_average=False)
          )
  
file_path: TextAttack/textattack/constraints/grammaticality/language_models/learning_to_write/adaptive_softmax.py
imports: import torch
  from torch import nn
  from torch.autograd import Variable
  from torch.nn.functional import log_softmax
  import textattack
label_desc: Use image node_id 1 to create a new AdaptiveLoss object from inherited base classes: nn with example: obj = AdaptiveLoss(cutoffs)