keras-team/tf-keras

AttributeError: module 'tf_keras.backend' has no attribute 'logsumexp'

Closed this issue · 6 comments

In colab, first pip install tf-keras , then

import tf-keras as keras
dir(keras.backend) #No logsumexp
keras.backend.backend() #tensorflow

from keras import backend as K
K.logsumexp #AttributeError

import tensorflow as tf
tf.__version__ #2.15.0
keras.__version__ #2.15.1

No logsumexp found, but still there is.
How to get this function?

@gitfourteen,
Thank you for reporting the issue. We are looking into the same. Could you please allow some time to analyse and debug the issue and provide the resolution. Thank you!

@gitfourteen,
Could you please elaborate about your Feature. Also, please specify the Use Cases for this feature. Thank you!

@gitfourteen,
Could you please elaborate about your Feature. Also, please specify the Use Cases for this feature. Thank you!

Thanks for your reply. from keras import backend as K do include logsumexp in early days before Keras merging into Tensorflow and this is routine going to backend for logsumexp, e.g., here, here and here, etc. However, backend of Keras became inconsistent since Keras 2, I think? See this issue reported 3 years ago.

In a word, since function logsumexp is not decorated as like others in backend, how can we import logsumexp in Keras 2?

@gitfourteen,
logsumexp method was deprecated from keras.backend. Please use it the same function under TF. Please check here for more information. Thank you!

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.