einops
einops copied to clipboard
logsumexp reduction support
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.