class_docstr: Sigmoid activation followed by a sigmoid cross entropy loss.
class_docstr_tok: ["Sigmoid","activation","followed","by","a","sigmoid","cross","entropy","loss","."]
code: def forward(self, inputs):
      self.retain_inputs((0, 1))
  
      xp = backend.get_array_module(*inputs)
      x, t = inputs
      self.ignore_mask = t != self.ignore_label
  
      # stable computation of the cross entropy.
      loss = -(
          self.ignore_mask
          * (x * (t - (x >= 0)) - xp.log1p(xp.exp(-xp.abs(x))))
      )
  
      if not self.reduce == "mean":
          return (utils.force_array(loss.astype(x.dtype)),)
  
      if self.normalize:
          count = xp.maximum(1, self.ignore_mask.sum())
      else:
          count = max(1, len(x))
      self.count = count
  
      # TODO(takagi): Fix to perform division in a specific dtype. See
      # cupy/cupy#1534.
      return (
          utils.force_array(
              xp.divide(xp.sum(loss), self.count), dtype=x.dtype
          ),
      )
  
file_path: chainer/chainer/functions/loss/sigmoid_cross_entropy.py
imports: import chainer
  from chainer import backend
  from chainer import function_node
  from chainer.functions.activation import sigmoid
  from chainer import utils
  from chainer.utils import type_check
label_desc: Use image node_id 3 for calling the SigmoidCrossEntropy obj's underlying member method code with example usage: obj.forward(inputs) and returns: utils, utils