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 'tensorflow.compat.v1' #8877

Closed
2 of 3 tasks
hzxie opened this issue Jul 16, 2020 · 4 comments
Closed
2 of 3 tasks

ModuleNotFoundError: No module named 'tensorflow.compat.v1' #8877

hzxie opened this issue Jul 16, 2020 · 4 comments
Labels
models:research models that come under research directory type:bug Bug in the code

Comments

@hzxie
Copy link

hzxie commented Jul 16, 2020

Prerequisites

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

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

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/research/feelvos

2. Describe the bug

I got the following error when running bash train.sh.
The README doesn't tell us which TF to use.

The backward compatibility of TF is REALLY AWFUL.

Traceback (most recent call last):
  File "/mnt/lustre/xiehaozhe/Development/feelvos/train.py", line 24, in <module>
    from feelvos import model
  File "/mnt/lustre/xiehaozhe/Development/feelvos/model.py", line 58, in <module>
    from deeplab import model
  File "/mnt/lustre/xiehaozhe/Development/feelvos/deeplab/model.py", line 58, in <module>
    from deeplab.core import feature_extractor
  File "/mnt/lustre/xiehaozhe/Development/feelvos/deeplab/core/feature_extractor.py", line 21, in <module>
    import tensorflow.compat.v1 as tf
ModuleNotFoundError: No module named 'tensorflow.compat.v1'

3. Steps to reproduce

bash train.sh

4. Expected behavior

The program runs normally without raising ModuleNotFoundError: No module named 'tensorflow.compat.v1'.

5. Additional context

None

6. System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Cent OS 7.3
  • Mobile device name if the issue happens on a mobile device: N/a
  • TensorFlow installed from (source or binary): Binary
  • TensorFlow version (use command below): 1.12.3
  • Python version: 3.6.5
  • Bazel version (if compiling from source): N/a
  • GCC/Compiler version (if compiling from source): 5.4.0
  • CUDA/cuDNN version: 9.0
  • GPU model and memory: NVIDIA TITAN Xp / 12GB
@TannerGilbert
Copy link

If you're using Tensorflow 1.x I recommend you use the r1.13.0 branch.

@hzxie
Copy link
Author

hzxie commented Jul 17, 2020

@TannerGilbert
What if I only have CUDA 9? TensorFlow 1.13 requires CUDA 10.
DON'T TELL ME TO UPGRADE TO CUDA 10.

@hzxie
Copy link
Author

hzxie commented Jul 17, 2020

I solved this problem by

 git reset fe748d4a4a1576b57c279014ac0ceb47344399c4 --hard

@hzxie hzxie closed this as completed Jul 17, 2020
@hzxie
Copy link
Author

hzxie commented Jul 17, 2020

Again, the backward compatibility of TF is REALLY AWFUL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
models:research models that come under research directory type:bug Bug in the code
Projects
None yet
Development

No branches or pull requests

2 participants