The following line of code gives me the above error in Keras. model is a Graph model in Keras.
score, acc = model.evaluate({
'input1': X_test1,
'input2': X_test2,
'output':Y_test}, batch_size=450)
but when I change it to the following, it runs fine.
predictions = model.predict({
'input1': X_test1,
'input2': X_test2}, batch_size=450)['output']
The Y_test here is a <type 'numpy.ndarray'> of <type 'numpy.ndarray'>. A one-hot encoded vector.
Sample Y_test:
[[1.,0.,0.],[1.,0.,0.],[0.,0.,1.]]