I believe from keras *
is not valid syntax, but you can do:
from keras import *
Note: PEP-8 recommends that you avoid wildcard imports...
"...as they make it unclear which names are present in the namespace,
confusing both readers and many automated tools. There is one
defensible use case for a wildcard import, which is to republish an
internal interface as part of a public API (for example, overwriting a
pure Python implementation of an interface with the definitions from
an optional accelerator module and exactly which definitions will be
overwritten isn't known in advance)."
But then you need to prefix a call with the submodule it comes from, for example:
f = layers.Dense(1)