我正在使用Python 2.7.5遵循tf.keras
教程,但是当我运行model.fit(data, labels, epochs=10, batch_size=32)
时出现错误信息:
>>> model.fit(data, labels, epochs=10, batch_size=32,validation_data= (val_data, val_labels))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/software/TensorFlow/1.8-GPU-py2/lib/python2.7/site-packages/tensorflow/python/keras/_impl/keras/engine/training.py", line 1143, in fit
batch_size=batch_size)
File "/software/TensorFlow/1.8-GPU-py2/lib/python2.7/site-packages/tensorflow/python/keras/_impl/keras/engine/training.py", line 751, in _standardize_user_data
feed_input_names = self._feed_input_names
AttributeError: 'Sequential' object has no attribute '_feed_input_names'
有人能指出问题在哪里吗?
tf.keras
时,我看到的错误类型非常奇怪。我可能会尝试使用原始的 keras。 - Daniel Möller