Help needed for C3W3 Assignment Question Duplicates Exercise 4 part:
I need perform prediction for the model for evaluation:
The default code already give:
test_gen = tf.data.Dataset.from_tensor_slices(((test_Q1, test_Q2),None)).batch(batch_size=batch_size)
I started my code to iterate test_gen as:
for step, (q, p) in enumerate(test_gen):
v1, v2 = model(q, training=False)
However, i got errors for prediction input parameters as:
As I mentioned in your previous question - you don’t need the for loop here.
Take a look at what your Exercise 01 Siamese(..) function accomplishes - it returns v1 and v2 concatenated. So what you need is pred = model.predict(..) - specify correct arguments, first one should be your input, the second one is verbose for illustration.
The next three lines essentially separates the v1 and v2 out from pred (which have them concatenated). Similar question how to get these.