docstr: X (FloatTensor): n x num_classes target (LongTensor): n, the indices of the target classes.
code: def forward(cls, ctx, X, target, alpha, proj_args):
      """X (FloatTensor): n x num_classes target (LongTensor): n, the indices of the target classes."""
      assert X.shape[0] == target.shape[0]
  
      p_star = cls.project(X, alpha, **proj_args)
      loss = cls.omega(p_star, alpha)
  
      p_star.scatter_add_(
          1, target.unsqueeze(1), torch.full_like(p_star, -1)
      )
      loss += torch.einsum("ij,ij->i", p_star, X)
      ctx.save_for_backward(p_star)
  
      return loss
  
imports: import torch
  import torch.nn
  from torch.autograd import Function
  from ludwig.constants import IGNORE_INDEX_TOKEN_ID
  from ludwig.utils.entmax.activations import entmax15, sparsemax
  from ludwig.utils.entmax.root_finding import entmax_bisect, sparsemax_bisect
label_desc: Use image node_id 1 for calling the _GenericLossFunction obj's underlying member method code with example usage: obj.forward(cls, ctx, X, target, alpha, proj_args) and returns: loss