我正在使用 Keras 来实现神经网络。但是当我使用时model = Sequential(),我收到以下错误:
AttributeError Traceback (most recent call last)
<ipython-input-31-fa9fd3b0e211> in <module>
8
9 # Create the model
---> 10 model = Sequential()
11 model.add(Dropout(0.1), input_shape=(128,))
12 model.add(Dense(256, activation='relu', kernel_initializer='he_uniform'))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/version_utils.py in __new__(cls, *args, **kwargs)
55 use_v2 = should_use_v2()
56 cls = swap_class(cls, training.Model, training_v1.Model, use_v2) # pylint: disable=self-cls-assignment
---> 57 return super(ModelVersionSelector, cls).__new__(cls)
58
59
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/lazy_loader.py in __getattr__(self, item)
60
61 def __getattr__(self, item):
---> 62 module = self._load()
63 return getattr(module, item)
64
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/lazy_loader.py …Run Code Online (Sandbox Code Playgroud)