class_docstr: Custom checkpointed function to compute the target score.
class_docstr_tok: ["Custom","checkpointed","function","to","compute","the","target","score","."]
docstr: Forward, without activations.
docstr_tok: ["Forward",",","without","activations","."]
code: def forward(  # type: ignore
      ctx: Any,
      i: torch.Tensor,
      w: torch.Tensor,
      target: torch.Tensor,
      kernel_obj: "MemoryEfficientVocabOutput",
  ) -> torch.Tensor:
      """Forward, without activations."""
      if DEBUG and dist.is_initialized() and dist.get_rank() == 0:
          print("DEBUG target fwd")
      ctx.save_for_backward(i, w, target)
      ctx.kernel_obj = kernel_obj
      with torch.no_grad():
          x = TargetScoreFunction.get_target_score(
              i,
              w,
              target,
              kernel_obj.fp_target,
              kernel_obj.margin,
              kernel_obj.scale,
          )
      return x
  
imports: from typing import Any, Optional, Tuple
  import torch
  from torch import nn
  import torch.distributed
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the TargetScoreFunction obj's underlying member method code with example usage: obj.forward(ctx, i, w, target, kernel_obj) and returns: x