code: def forward_gpu(self, inputs_and_grad_outputs):
      class_weight = cuda.to_gpu(self.class_weight)
  
      cupy = cuda.cupy
      x, t, gloss = inputs_and_grad_outputs
      if x.size == 0:
          return cupy.zeros(x.shape, dtype=x.dtype), None
      if self.y is not None:
          y = self.y
      else:
          y = log_softmax._log_softmax(x)
          cupy.exp(y, out=y)
      n_unit = t.size // len(t)
      if self.coeff is not None:
          coeff = self.coeff
      else:
          gloss = gloss[:, None, ...]
          coeff = cupy.array(
              1, dtype=gloss.dtype
          )  # dtype does not matter
  
      if self.soft_target:
          gx = gloss * coeff * (y - t)
      elif self.class_weight is None:
          gx = cuda.elementwise(
              "T y, S t, T gloss, U coeff, S n_channel, S n_unit, "
              "S ignore_label",
              "T gx",
              """
                      const int c = (i / n_unit % n_channel);
                      if (t == ignore_label) {
                          gx = T(0);
                      } else {
                          gx = static_cast<T>(gloss * coeff * (y - (c == t)));
                      }
                  """,
              "softmax_crossent_bwd",
          )(
              y,
              cupy.expand_dims(t, 1),
              gloss,
              coeff,
              x.shape[1],
              n_unit,
              self.ignore_label,
          )
      else:
          gx = cuda.elementwise(
              "T y, raw T w, S t, T gloss, U coeff, "
              "S n_channel, S n_unit, S ignore_label",
              "T gx",
              """
                      const int c = (i / n_unit % n_channel);
                      if (t == ignore_label) {
                          gx = T(0);
                      } else {
                          gx = static_cast<T>(
                              gloss * coeff * (y - (c == t)) * w[t]);
                      }
                  """,
              "softmax_crossent_weight_bwd",
          )(
              y,
              class_weight,
              cupy.expand_dims(t, 1),
              gloss,
              coeff,
              x.shape[1],
              n_unit,
              self.ignore_label,
          )
  
      return (gx,)
  
imports: import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.functions.activation import log_softmax
  from chainer.utils import type_check
  from chainer import variable
  import chainerx
label_desc: Use image node_id 3 for calling the _SoftmaxCrossEntropyGrad_NoDoubleBackprop obj's underlying member method code with example usage: obj.forward_gpu(inputs_and_grad_outputs) and returns: gx, cupy,  None