class_docstr: Softmax activation function.
class_docstr_tok: ["Softmax","activation","function","."]
code: def forward(self, x):
      xp = backend.get_array_module(*x)
      if xp is cuda.cupy and chainer.should_use_cudnn(">=auto"):
          y = cudnn.softmax_forward(x[0], self.axis, _algorithm)
      else:
          y = x[0] - x[0].max(axis=self.axis, keepdims=True)
          xp.exp(y, out=y)
          y /= y.sum(axis=self.axis, keepdims=True)
  
      self.retain_outputs((0,))
      return (y,)
  
file_path: chainer/chainer/functions/activation/softmax.py
imports: import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  import chainer.functions
  from chainer.utils import type_check
label_desc: Use image node_id 3 for calling the Softmax obj's underlying member method code with example usage: obj.forward(x) and returns: y