you seem to have edited the codes. don’t add your own codes.
You were suppose to only write codes between ###START AND END CODE HERE### for the instructions already given.
you initiated the below part of code
accuracy = 0
for j in range(batch_size):
d = math.reduce_sum(v1[j]*v2[j])
res = d > threshold
accuracy += tf.cast(y_test[j] == res, tf.float64)
if(y_test[j] == res):
y_pred.append(1)
else:
y_pred.append(0)
accuracy = accuracy / batch_size
then at the end
This is not the way codes works. Get a fresh copy, then implement the steps as per each instructions given.
The below thread should help you resolve your issue
Regards
DP