class_docstr: Sigmoid cross entropy gradient function.
class_docstr_tok: ["Sigmoid","cross","entropy","gradient","function","."]
code: def forward(self, inputs):
      self.retain_inputs((0, 1))
  
      xp = backend.get_array_module(*inputs)
      x, gy = inputs
  
      (y,) = sigmoid.Sigmoid().forward((x,))
      if self.reduce == "mean":
          # TODO(takagi): Fix to perform division in a specific dtype. See
          # cupy/cupy#1534.
          gx = xp.divide(
              gy * self.ignore_mask * (y - self.t), self.count
          ).astype(y.dtype)
      else:
          gx = (gy * self.ignore_mask * (y - self.t)).astype(y.dtype)
  
      return (gx,)
  
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 2 for calling the SigmoidCrossEntropyGrad obj's underlying member method code with example usage: obj.forward(inputs) and returns: gx