python - 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”
解决方案
尝试将input_shape
参数添加到网络的第一层。这为我解决了这个问题。
推荐阅读
- python - 如何将带有 NUL 行 ('\x00') 的 csv 读入 pandas?
- python - 使用 python 在 pandas 中添加零时 sum() 函数无法正常工作
- octave - Octave 继续执行我的代码的先前版本
- scala - 如何过滤 RDD scala 中的重复项?
- wordpress - 如何将相同的类添加到wordpress中的所有现有帖子?
- javascript - Vuejs:我无法为同一个 vue 元素生成新内容
- excel - 您如何在“直到循环”中取平均值?
- android - 如何根据android系统设置禁用日夜主题的自动更改?
- android - 如何在自定义 lint 规则中解决 context.report 的重载解析歧义?
- javascript - 在反应项目中显示代码块