class_docstr: L2 normalization
class_docstr_tok: ["L2","normalization"]
code: def backward(self, indexes, grad_outputs):
      (x,) = self.get_retained_inputs()
      (gy,) = grad_outputs
      F = chainer.functions
  
      norm_noeps = F.sqrt(
          F.sum(F.square(x), axis=self.axis, keepdims=True)
      )
      norm = norm_noeps + self.eps
  
      x_gy_reduced = F.sum((x * gy), axis=self.axis, keepdims=True)
  
      # L2 normalize with eps has continuous backward. However,
      # the backward is not differentiable for the indices of zero vectors.
      # To avoid nan in double backward, do not compute outside of mask.
      mask = norm_noeps.array != 0
      (x_gy_reduced,) = _SetItemZero(mask).apply(
          (x_gy_reduced[mask] / norm_noeps[mask],)
      )
  
      gx = gy * norm - x_gy_reduced * x
      gx = gx / norm**2
  
      return (gx,)
  
file_path: chainer/chainer/functions/normalization/l2_normalization.py
imports: import six
  from chainer import backend
  from chainer import function_node
  import chainer.functions
  from chainer import utils
  from chainer.utils import type_check
label_desc: Use image node_id 4 for calling the NormalizeL2 obj's underlying member method code with example usage: obj.backward(indexes, grad_outputs) and returns: gx