code: def set_target(self, target):
      self.id = []
      for i in range(len(self.cutoffs) - 1):
          mask = target.ge(self.cutoffs[i]).mul(
              target.lt(self.cutoffs[i + 1])
          )
          if mask.sum() > 0:
              self.id.append(
                  Variable(mask.float().nonzero().squeeze(1))
              )
          else:
              self.id.append(None)
  
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 3 for calling the AdaptiveSoftmax obj's underlying member method code with example usage: obj.set_target(target) without return types