code: def _docs_loss():
      _docs.set_doc(
          chainerx.absolute_error,
          """Element-wise absolute error function.
  
  Computes the element-wise absolute error :math:`L` between two inputs
  :math:`x_1` and :math:`x_2` defined as follows.
  
  .. math::
      L = |x_1 - x_2|
  
  Args:
      x1 (~chainerx.ndarray): Input variable.
      x2 (~chainerx.ndarray): Input variable.
  
  Returns:
      :class:`~chainerx.ndarray`: A variable holding an array representing
      the absolute error of two inputs.
  
  .. seealso:: :func:`chainer.functions.absolute_error`
  """,
      )
  
      _docs.set_doc(
          chainerx.squared_error,
          """Element-wise squared error function.
  
  Computes the element-wise squared error :math:`L` between two inputs
  :math:`x_1` and :math:`x_2` defined as follows.
  
  .. math::
      L = (x_1 - x_2)^2
  
  Can be used to compute mean squared error by just calling `mean()`
  on the output array.
  
  Args:
      x0 (~chainerx.ndarray): Input variable.
      x1 (~chainerx.ndarray): Input variable.
  
  Returns:
      :class:`~chainerx.ndarray`: A variable holding an array representing
      the squared error of two inputs.
  
  .. seealso:: :func:`chainer.functions.squared_error`
  """,
      )
  
      _docs.set_doc(
          chainerx.huber_loss,
          """Element-wise Huber loss.
  
  The Huber loss is similar to the squared error but is less sensitive to
  outliers in the data. It is defined as
  
  .. math::
  
      L_{\\delta}(a) = \\left \\{ \\begin{array}{cc}
      \\frac{1}{2} a^2 & {\\rm if~|a| \\leq \\delta} \\\\
      \\delta (|a| - \\frac{1}{2} \\delta) & {\\rm otherwise,}
      \\end{array} \\right.
  
  where :math:`a = x - t` is the difference between the input :math:`x`
  and the target :math:`t`.
  
  See: `Huber loss - Wikipedia <https://en.wikipedia.org/wiki/Huber_loss>`_.
  
  Args:
      x (~chainerx.ndarray): Input variable.
      t (~chainerx.ndarray): Target variable for regression.
      delta (float): Constant variable for Huber loss function as used in
          definition.
  
  Returns:
      :class:`~chainerx.ndarray`:
          A variable object holding an array representing the Huber loss
          :math:`L_{\\delta}` of the two inputs.
  
  .. seealso:: :func:`chainer.functions.huber_loss`
  """,
      )
  
      _docs.set_doc(
          chainerx.gaussian_kl_divergence,
          """Element-wise KL-divergence of Gaussian variables from the standard one.
  
  Given two variable ``mean`` representing :math:`\\mu` and ``ln_var``
  representing :math:`\\log(\\sigma^2)`, this function calculates
  the element-wise KL-divergence between the given multi-dimensional
  Gaussian :math:`N(\\mu, S)` and the standard Gaussian :math:`N(0, I)`
  
  .. math::
  
     D_{\\mathbf{KL}}(N(\\mu, S) \\| N(0, I)),
  
  where :math:`S` is a diagonal matrix such that :math:`S_{ii} = \\sigma_i^2`
  and :math:`I` is an identity matrix.
  
  Args:
      mean (~chainerx.ndarray):
          A variable representing mean of given
          gaussian distribution, :math:`\\mu`.
      ln_var (~chainerx.ndarray):
          A variable representing logarithm of
          variance of given gaussian distribution, :math:`\\log(\\sigma^2)`.
  
  Returns:
      :class:`~chainerx.ndarray`:
          A variable representing KL-divergence between
          given gaussian distribution and the standard gaussian.
  
  .. seealso:: :func:`chainer.functions.gaussian_kl_divergence`
  """,
      )
  
      _docs.set_doc(
          chainerx.sigmoid_cross_entropy,
          """sigmoid_cross_entropy(x1, x2)
  
  Element-wise cross entropy loss for pre-sigmoid activations.
  
  Args:
      x1 (~chainerx.ndarray): An array whose (i, j)-th element indicates the
          unnormalized log probability of the j-th unit at the i-th example.
      x2 (~chainerx.ndarray): An array whose (i, j)-th element indicates a signed
          integer vector of ground truth labels 0 or 1. If ``x2[i, j] == -1``,
          corresponding ``x1[i, j]`` is ignored. Loss is zero if all ground truth
          labels are -1.
  
  Returns:
      :class:`~chainerx.ndarray`: An array of the cross entropy.
  
  Note:
      During backpropagation, this function propagates the gradient of the output
      array to the input array ``x1`` only.
  """,
      )
  
      _docs.set_doc(
          chainerx.softmax_cross_entropy,
          """softmax_cross_entropy(x1, x2)
  
  Element-wise cross entropy loss for pre-softmax activations.
  
  Args:
      x1 (~chainerx.ndarray): An array whose element indicates unnormalized log
          probability: the first axis of the array represents the number of
          samples, and the second axis represents the number of classes.
      x2 (~chainerx.ndarray): A signed integer vector of ground truth labels. If
          ``x2[i] == -1``, corresponding ``x1[i]`` is ignored.
  
  Returns:
      :class:`~chainerx.ndarray`: An array of the cross entropy.
  
  Note:
      During backpropagation, this function propagates the gradient of the output
      array to the input array ``x1`` only.
  """,
      )
  
file_path: chainer/chainerx/_docs/routines.py
imports: import chainerx
  from chainerx import _docs
label_desc: Use image node_id 7 for calling a global function with example usage: _docs_loss() without return types