-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects' #14632
Comments
dear keras-team, do you have any plan to release a newer stable version of Keras? Currently, the stable Keras |
Same issue here, with tensoflow 2.5.0, updated verion of keras doesn't work. Any plans to fix this issue. |
Same issue here! |
same issue |
same issue here with |
same here with a standard keras installation |
same issue |
Replaced everything of
Change layers as :
Change Optimizer:
Change Operations:
|
Trust me the above might be a long solution but will work in the long run. |
I've gotten around this by uninstalling keras and changing anything I import from keras to instead import from tensorflow.keras So this:
became this:
and then I didn't have to amend the rest of my work |
same issue when import hyperas |
Had the same issue, after I uninstalled all tensorflows and keras-nightly, I reinstalled tensorflow with |
@aliwelchoo @khanfarhan10 The |
`# import tensorflow.compat.v2 as tf @keras_export('keras.initializers.deserialize') . ` |
same issue |
replace: with: |
Same Issue I had also seen,.. I update the importing header keras instead with tensorflow... Its working.. all my model from tensorflow.keras import Sequential |
I'm having trouble with keras_self_attention import SeqSelfAttention. Does someone know how to solve this problem? |
can someone explain to how to do this, i still new and do not understand |
Yes it worked for me thanks everyone. Replacing keras with tensorflow.keras will definitely run your program |
@anasfathi0 Instead of using the |
Hi Farhan,
Yeah I did that and it worked. Thanks very much
…On Tue, Jun 1, 2021, 09:30 Farhan Hai Khan ***@***.***> wrote:
@anasfathi0 <https://github.com/anasfathi0> Instead of using the keras
library explicitly, use tensorflow backend and call keras implicitly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14632 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANRLWQ7UW2P4JVB57RDU4KTTQRO7DANCNFSM44HJHL4A>
.
|
This sorted me out. |
THANK YOU SO MUCH!!!! YOU'RE A GOD!! |
This is the way to go. Tensorflow will ensure the compatibility with keras if you use the sub-package. |
Thanks to this had to run a fun pip install force reinstall keras-team/keras#14632 Solution found here after reinstalling tensorflow with updated keras https://stackoverflow.com/questions/67703871/importerror-cannot-import-name-to-categorical-from-keras-utils-usr-local Things run now.
same issue here QwQ |
THANKSSSSSS, IT WORK!!!!!! |
If you work on ubuntu and conda:
{ENV} = your conda environment name |
Solved on google Colab (CUDA==11.0; tensorflow==1.15) by adding
this gives an error:
this works:
|
Where and what is the file i must edit this? |
Hello, i updated the TensorFlow through Anaconda Prompt with command line: |
Closing this issue since its resolved. Feel free to post a new issue if still have problems. Thanks! |
going back to Tensorflow 2.2.1 as 2.5.1 is not compatible with Keras version. For details see keras-team/keras#14632
Have you managed to solve the issue? |
pip install keras-self-attention==0.50.0 this is works for me |
from keras.utils import np_utils sometime work... |
Reinstalling the tensorflow solved my same issue |
Please add the snippet of the code into the program of general_utils.py 1. Find out your path For me, the path is listed as follows: /home/user/miniconda3/lib/python3.7/site-packages/tensorflow/python/keras/utils/generic_utils.py 2. Paste the code into the program of generic_utils.py
3. Initialize the dev tool It will be working after initializing the dev tool (it is Terminal for me in Linux) |
Needed to do:
cp ./lib64/python3.9/site-packages/tensorflow/python/keras/utils/generic_utils.py ./lib/python3.9/site-packages/keras/utils/generic_utils.py
in my virtualenv.The text was updated successfully, but these errors were encountered: