aesara.tensor.logsumexp

Contents

aesara.tensor.logsumexp#

aesara.tensor.logsumexp(x, axis=None, keepdims=False)[source]#

Compute the log of the sum of exponentials of input elements.

See scipy.special.logsumexp.

Parameters:
  • x (symbolic tensor) – Input

  • axis (None or int or tuple of ints, optional) – Axis or axes over which the sum is taken. By default axis is None, and all elements are summed.

  • keepdims (bool, optional) – If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the original array.

Return type:

tensor