错误:ValueError: Layer model_82 expects 1 input(s), but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(None, 40, 60, 1) dtype=float32>, <tf.Tensor 'IteratorGetNext:1' shape=(None, 2) dtype=float32>]
代码:
history = model.fit([training_feat], training_clabel,
batch_size=batch_size,
epochs=epochs,
validation_data=([validation_feat, valid_clabel]),
callbacks=callbacks_list,
verbose=1)
解决: 修改validation_data部分
history = model.fit([training_feat], training_clabel,
batch_size=batch_size,
epochs=epochs,
validation_data=(validation_feat, valid_clabel),
callbacks=callbacks_list,
verbose=1)