AttributeError: module 'keras' has no attribute 'applications'
See original GitHub issueI got this error via latest install for pip. This error a got after this:
from keras_bert.loader import load_trained_model_from_checkpoint
Stacktrace: `/usr/local/lib/python3.7/dist-packages/keras_bert/backend.py in <module>() 18 utils = keras.utils 19 activations = keras.activations —> 20 applications = keras.applications 21 backend = keras.backend 22 datasets = keras.datasets
AttributeError: module ‘keras’ has no attribute ‘applications’`
Okay. I had seen https://github.com/CyberZHG/keras-bert/blob/master/keras_bert/backend.py
and i don’t find call of application. Keras don’t have applications method but tf.keras already have.
What i doing wrong?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
module 'keras.applications' has no attribute 'VGG16' - Stack ...
I'm trying to run code that is supposed to identify different types of image categories. The code is of VGG16 and I have...
Read more >module 'keras.applications' has no attribute 'ResNet101 ...
Applications are missing (AttributeError: module 'keras.applications' has no attribute 'ResNet101/ResNeXt50/ResNeXt101') #12997.
Read more >How do you fix the error "Module 'keras_applications' has no ...
Without seeing the code, it's impossible to say what the source of the bug is. AttributeError is raised when access to a non-existant...
Read more >tf.keras.applications.mobilenet_v2.MobileNetV2 - TensorFlow
For MobileNetV2, call tf.keras.applications.mobilenet_v2.preprocess_input on your inputs before passing them to the model.
Read more >AttributeError: module 'tensorflow… | Apple Developer Forums
I am running tensorflow-macos and tensorflow-metal on Big Sur. I am getting this error: AttributeError: module 'tensorflow.keras' has no attribute ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This may due to the update of tensorflow (2.5.0). Please try
keras-bert==0.87.0
.Set the environment variable
TF_KERAS=1
to force keras-bert to use tf.keras instead of keras.os.environ["TF_KERAS"]="1"