- stackOverflow 上有类似的问题,例如:https://stackoverflow.com/questions/42379138/keras-valueerror-no-data-provided-for-input-1-need-data-for-each-key
下面评论说,可能情况有:
- The input data does not have the same dimension as was declared in the first layer
- The input data includs missing values
- The input data is not a matrix (for example, a data frame)
- 但我的问题不是这样,我的keras 使用了triplet loss,多个输入和输出,用dict描述,因此要注意,
model = Model(inputs=[xx, xxx, xxxx], outputs=[y1,y2,y3])
输入dict的key要和Input layer 的name一一对应,同理输出dict的key要和输出层的name一一对应。