Skip to content
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

ModuleNotFoundError: No module named 'tf_keras' #11108

Closed
bcouraud opened this issue Nov 5, 2023 · 12 comments
Closed

ModuleNotFoundError: No module named 'tf_keras' #11108

bcouraud opened this issue Nov 5, 2023 · 12 comments
Assignees
Labels
models:official models that come under official repository stale stat:awaiting response Waiting on input from the contributor type:bug Bug in the code

Comments

@bcouraud
Copy link

bcouraud commented Nov 5, 2023

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [ x] I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • [x ] I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • [ x] I checked to make sure that this issue has not been filed already.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/official/...

2. Describe the bug

Hi,
I must be doing something wrong, but trying to run the "official" tutorial on object detection from: https://www.tensorflow.org/tfmodels/vision/object_detection I get the error:

ModuleNotFoundError: No module named 'tf_keras'

3. Steps to reproduce

Run https://colab.research.google.com/github/tensorflow/models/blob/master/docs/vision/object_detection.ipynb#scrollTo=x_8cmB82Y65O

4. Expected behavior

The erorr ModuleNotFoundError: No module named 'tf_keras' should appear at each line " import tensorflow as tf, tf_keras"

5. Additional context

I guess this is a version issue but not sure how to solve it quickly.

6. System information

Colab

@bcouraud bcouraud added models:official models that come under official repository type:bug Bug in the code labels Nov 5, 2023
@atsanders
Copy link

I also ran into this issue and it appears it was introduced last week. Not sure if it's a bug or just a version issue as you said. One way I got around it was to clone the models repo and checkout the commit right before that code was committed.

In my case I did:
!git clone https://github.com/tensorflow/models
%cd /content/models
!git checkout 560446a

@laxmareddyp
Copy link
Collaborator

laxmareddyp commented Nov 7, 2023

Hi @bcouraud @oldolph ,

We've submitted a PR to address the error. Once the PR is merged, you should be able to use the notebook as you normally would.

Thanks

@laxmareddyp laxmareddyp added the stat:awaiting response Waiting on input from the contributor label Nov 7, 2023
Copy link

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Nov 15, 2023
@kunal7biz
Copy link

Facing the same issue today, while installing Tensorflow from Jupyter notebook. Please help with a solution

@google-ml-butler google-ml-butler bot removed stale stat:awaiting response Waiting on input from the contributor labels Nov 19, 2023
@sineeli
Copy link
Collaborator

sineeli commented Nov 20, 2023

Hi @kunal7biz,

Please try to install tf_keras and you should be able to run without error.

pip install tf-keras

@kunal7biz
Copy link

Hi @kunal7biz,

Please try to install tf_keras and you should be able to run without error.

pip install tf-keras

I was able to get it run using !git checkout 560446a after cloning the model as mentioned by oldolph

@laxmareddyp laxmareddyp added the stat:awaiting response Waiting on input from the contributor label Nov 21, 2023
Copy link

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Nov 29, 2023
Copy link

github-actions bot commented Dec 6, 2023

This issue was closed due to lack of activity after being marked stale for past 7 days.

@github-actions github-actions bot closed this as completed Dec 6, 2023
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

@pq53ui
Copy link

pq53ui commented Feb 19, 2024

I'm using tensorflow/tensorflow:1.15.5-gpu-py3 docker image.
Keras version 2.2.5 worked for me.

@prajwalsm8050
Copy link

pip install tf-keras

this helped me , thankyou

@laclouis5
Copy link

As of today, the issue does not seem to be solved. Is a bug fix planned or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
models:official models that come under official repository stale stat:awaiting response Waiting on input from the contributor type:bug Bug in the code
Projects
None yet
Development

No branches or pull requests

8 participants