homomathematicus
homomathematicus

Reputation: 121

Cannot import name 'tf2'

I created a v.environment where I have Python version 3.6.5 and there I installed tensorflow-gpu.
The version of TensorFlow is 1.4.0 and of Keras is 2.6.0.
When I write on the script import keras it appears the following Error:

ImportError: cannot import name 'tf2'

Have you any idea?

Upvotes: 2

Views: 13669

Answers (1)

user11530462
user11530462

Reputation:

From comments

Here the problem caused by the TF is too old, and the keras is too new. Your choice is to downgrade keras to 2.2.1, or use newer version of tf (paraphrased by Vinson Ciawandy & homomathematicus)

Upvotes: 2

Related Questions