I got this error when I tried to modify the learning rate parameter of SGD optimizer in Keras. Did I miss something in my codes or my Keras was not installed properly?
Try changing your import lines to
from keras.models import Sequential from keras.layers import Dense, ...
Your imports seem a little strange to me. Maybe you could elaborate more on that.