[Keras] [multiple inputs / outputs] ValueError: No data provided for "xx". Need data for each key...

  • stackOverflow 上有类似的问题,例如:https://stackoverflow.com/questions/42379138/keras-valueerror-no-data-provided-for-input-1-need-data-for-each-key
    下面评论说,可能情况有:
  1. The input data does not have the same dimension as was declared in the first layer
  2. The input data includs missing values
  3. 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一一对应。

你可能感兴趣的:([Keras] [multiple inputs / outputs] ValueError: No data provided for "xx". Need data for each key...)