docstr: For each output and single target, loss is calculated.
  The returned loss value is the sum loss across all outputs.
code: def forward(
      self,
      output: Union[torch.Tensor, List[torch.Tensor]],
      target: torch.Tensor,
  ):
      """
      For each output and single target, loss is calculated.
      The returned loss value is the sum loss across all outputs.
      """
      if isinstance(output, torch.Tensor):
          output = [output]
      assert isinstance(
          output, list
      ), "Model output should be a list of tensors. Got Type {}".format(
          type(output)
      )
      assert torch.is_tensor(
          target
      ), "Target should be a tensor. Got Type {}".format(type(target))
  
      loss = 0
      for idx, pred in enumerate(output):
          normalized_pred = pred
          if self._normalize_output:
              normalized_pred = nn.functional.normalize(
                  pred, dim=1, p=2
              )
  
          mask1 = target == -1
          # number of valid (0 or 1 label) entries per class
          num_per_class = torch.sum(~mask1, dim=0)
          # number of classes with no valid entries.
          mask2 = num_per_class == 0
          num_per_class.masked_fill_(mask2, 1)
  
          if idx >= len(self._losses):
              self._create_loss_function()
  
          loss += torch.sum(
              self._losses[idx](
                  normalized_pred, target.float()
              ).masked_fill_(mask1, 0)
              / num_per_class
          )
      return loss
  
file_path: vissl/vissl/losses/bce_logits_multiple_output_single_target.py
imports: from typing import List, Union
  import torch
  from classy_vision.generic.util import is_on_gpu
  from classy_vision.losses import ClassyLoss, register_loss
  from torch import nn
  from vissl.config import AttrDict
label_desc: Use image node_id 4 for calling the BCELogitsMultipleOutputSingleTargetLoss obj's underlying member method code with example usage: obj.forward(output, target) and returns: loss