首页 > 解决方案 > AttributeError:“顺序”对象在 Keras Theano 中没有属性“_feed_input_names”

问题描述

在执行语句时,

hist = model.fit(X_train, Y_train, batch_size=batch_size, epochs=nb_epoch,
               verbose=1, validation_data=(X_test, Y_test))
I'm getting the error,
 File "C:\Users\Parag\Anaconda3\envs\keras_theano\lib\site-packages\keras\engine\training.py", line 737, in _standardize_user_data
    feed_input_names = self._feed_input_names

AttributeError:“顺序”对象没有属性“_feed_input_names”

标签: pythonkerastheano

解决方案


尝试将input_shape参数添加到网络的第一层。这为我解决了这个问题。


推荐阅读