einops icon indicating copy to clipboard operation
einops copied to clipboard

logsumexp reduction support

Open arogozhnikov opened this issue 5 years ago • 0 comments

It would be nice to have it, but there are problems with backends

  • numpy.logaddexp.reduce is available (scipy.special.logsumexp is better, but I can't use it)
  • tf.reduce_logsumexp is available
  • problem cupy doesn'h have an implementation
  • chainer has "chainer.functions.logsumexp", but we can't use if for cupy
  • torch.logsumexp
  • problem gluon and mxnet don't provide logsumexp
  • keras provides keras.backend.logsumexp

Custom implementation through exp and max would take probably much more memory for a backward pass.

arogozhnikov avatar Nov 03 '18 02:11 arogozhnikov