Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: module 'keras' has no attribute 'applications'

See original GitHub issue

I 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/ 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 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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

CyberZHGcommented, Jun 16, 2021

This may due to the update of tensorflow (2.5.0). Please try keras-bert==0.87.0.

mtchibozocommented, Sep 19, 2021

Set the environment variable TF_KERAS=1 to force keras-bert to use tf.keras instead of keras. os.environ["TF_KERAS"]="1"

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found