AttributeError: 'Sequential' object has no attribute '_feed_input_names' in Keras Theano

纵然是瞬间 提交于 2020-01-04 14:19:49

问题


While executing the statement,

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: 'Sequential' object has no attribute '_feed_input_names'


回答1:


Try adding the input_shape argument to the first layer in your network. This solved the issue for me.



来源:https://stackoverflow.com/questions/55062447/attributeerror-sequential-object-has-no-attribute-feed-input-names-in-kera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!