Reputation: 11
I built a vqa model, and set two inputs(images, questions). It was well trained with train/val datasets, but with test_dataset, it keep printing errors like below;
ValueError: Layer "model" expects 2 input(s), but it received 1 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(224, 224, 3) dtype=float32>]
The variables I used are;
test_qt and test_it are both lists of tensors..
I built a dataset with this code;
test_ds = tf.data.Dataset.from_tensor_slices((test_it, test_qt))
I also tried to directly give each input separately but got this error.
ValueError: Data cardinality is ambiguous:
x sizes: 224, 224, 302, 302
Make sure all arrays contain the same number of samples.
Upvotes: 1
Views: 111