code: def forward(self, x, w):
          
  
          if self.bias is None:
              return (w.unsqueeze(2) * self.weight(x)).sum(dim=1)
          else:
              return (w.unsqueeze(2) * self.weight(x)).sum(dim=1) + self.bias
docs: Forward function.
  
          :param x: Feature indices.
          :type x: torch.Tensor of shape (batch_size * length)
          :param w: Feature weights.
          :type w: torch.Tensor of shape (batch_size * length)
          :return: Output of linear layer.
          :rtype: torch.Tensor of shape (batch_size, num_classes)