class_docstr: BCEWithLogitsLoss
  
  https://pytorch.org/docs/1.9.1/generated/torch.nn.BCEWithLogitsLoss.html
class_docstr_tok: ["BCEWithLogitsLoss","https",":","\/\/pytorch.org\/docs\/1.9.1\/generated\/torch.nn.BCEWithLogitsLoss.html"]
docstr: Args:
      logits_ndim: number of dimensions (or rank) of the logits tensor
      weight: list of rescaling weight given to each class
      reduction: type of the reduction over the batch
      pos_weight: weight given to positive samples
docstr_tok: ["Args",":","logits_ndim",":","number","of","dimensions","(","or","rank",")","of","the","logits","tensor","weight",":","list","of","rescaling","weight","given","to","each","class","reduction",":","type","of","the","reduction","over","the","batch","pos_weight",":","weight","given","to","positive","samples"]
code: def __init__(
      self,
      logits_ndim: int = 2,
      weight: torch.Tensor = None,
      reduction: str = "mean",
      pos_weight: torch.Tensor = None,
  ):
      """
      Args:
          logits_ndim: number of dimensions (or rank) of the logits tensor
          weight: list of rescaling weight given to each class
          reduction: type of the reduction over the batch
          pos_weight: weight given to positive samples
      """
      if pos_weight is not None and not torch.is_tensor(pos_weight):
          pos_weight = torch.FloatTensor(pos_weight)
  
      super().__init__(
          weight=weight, pos_weight=pos_weight, reduction=reduction
      )
      self._logits_dim = logits_ndim
  
file_path: NeMo/nemo/collections/common/losses/bce_logits_loss.py
imports: from typing import List
  import torch
  from torch import nn
  from nemo.core.classes import Serialization, Typing, typecheck
  from nemo.core.neural_types import LabelsType, LogitsType, LossType, MaskType, NeuralType
label_desc: Use image node_id 3 to create a new BCEWithLogitsLoss object from inherited base classes: nn, Serialization, Typing with example: obj = BCEWithLogitsLoss(logits_ndim, weight, reduction, pos_weight)