This is NOT MY code by here is the line, where it shows a problem:
model.fit(trainX, trainY, batch_size=2, epochs=200, verbose=2)
(As I am thinking now, it i
I had to import the correct libraries (Tensorflow and not Keras directly):
from tensorflow.python import keras.models.Sequential
from tensorflow.python import keras.layers.Dense
from tensorflow.python.keras.layers import Input, Dense
from tensorflow.python.keras.models import Sequential
Apparently this is related to the different version issue of Keras.