code: def forward(self, x, **kwargs):
      xi = x[:, :-1]
      xo = x[:, 1:]
  
      # help auto-solve an area of confusion around input masks in auto-regressive
      # if user supplies a mask that is only off by one from the source sequence, resolve it for them
      mask = kwargs.pop("mask", None)
      if mask is not None and mask.shape[1] == x.shape[1]:
          mask = mask[:, :-1]
      kwargs.update(mask=mask)
  
      out = self.net(xi, **kwargs)
  
      loss = F.cross_entropy(
          out.transpose(1, 2), xo, ignore_index=self.ignore_index
      )
      return loss
  
file_path: performer-pytorch/performer_pytorch/autoregressive_wrapper.py
imports: from functools import partial
  import torch
  from torch import nn
  import torch.nn.functional
  from torch.nn.utils.rnn import pad_sequence
label_desc: Use image node_id 3 for calling the AutoregressiveWrapper obj's underlying member method code with example usage: obj.forward(x) and returns: loss