Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Conversation

CryptoSalamander
Copy link

There are "no attribute" errors such as
AttributeError: module 'tensorflow' has no attribute 'gfile'
AttributeError: module 'tensorflow' has no attribute 'flags'

because tensorflow V2 is automatically installed from pip install -r requirements.txt.

To fix this error, I added version check code and make it works properly in TensorFlow V2 environments.

Also, TensorFlow V1 users can use this code. because if tf.version is lower than 2.0.0, it will use legacy code.

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

Successfully merging this pull request may close these issues.

1 participant