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

module 'tensorflow' has no attribute 'flags' #1159

Open
katysei opened this issue Oct 11, 2020 · 4 comments
Open

module 'tensorflow' has no attribute 'flags' #1159

katysei opened this issue Oct 11, 2020 · 4 comments

Comments

@katysei
Copy link

katysei commented Oct 11, 2020

how to fix it?

@zhiyongLiu1114
Copy link

install tensorflow 1.14

@chansonzhang
Copy link

install tensorflow 1.14

solved my problem, thank you

@mHacks2021
Copy link

i want to use TF 2.x How to fix it

@caop-kie
Copy link

caop-kie commented Oct 21, 2022

I followed the fix in #1247 and v2.10.0 works fine now.

if(tf.__version__.startswith("2")):
    # tf.gfile = tf.io.gfile
    tf.gfile = tf.compat.v1.gfile
    tf.flags = tf.compat.v1.flags
    tf.app = tf.compat.v1.app
    tf.logging = tf.compat.v1.logging
    tf.python_io = tf.compat.v1.python_io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants