chainerx.logsumexp

chainerx.logsumexp(x, axis=None, keepdims=False)

The log of the sum of exponentials of input array.

Parameters
  • x (ndarray) – Input array.

  • axis (None or int or tuple of ints) – Axis or axes along which a sum is performed. The flattened array is used by default.

  • keepdims (bool) – If this is set to True, the reduced axes are left in the result as dimensions with size one.

Returns

The log of the sum of exponentials of input elements over a given axis.

Return type

ndarray

Note

During backpropagation, this function propagates the gradient of the output array to the input array x.