Cannot import name 'tf2'
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)
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?