I have just installed the stable version of TensorFlow 2.0 (released on October 1st 2019) in PyCharm.
The problem is that the keras package
SOLVED --- See the answers to this problem below.
SOLUTION 1 (best solution)
Is the accepted answer provided above. It works on EAP version, I tested it on several machines with Windows.
SOLUTION 2
Although PyCharm does not recognise the modules, running the .py file works. I still do not know if this is a problem of TensorFlow or PyCharm, but this is the solution that I have found, many people have run into this problem.
SOLUTION 3
Import the modules from tensorflow_core
instead of tensorflow
Example: from tensorflow_core.python.keras.preprocessing.image import ImageDataGenerator
However, as mentioned by @Nagabhushan S N in the comment below and above in the accepted answer:
On the other hand avoid imports from tensorflow_core if you do not want to refactor your code in the future.