You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can we find the testing accuracy?
I ran the following code
y_pred, y_test = predict('/content/gdrive/My Drive/Car-Recognition/data/test', model)
acc = calc_acc(y_pred, y_test)
print("%s: %.2f%%" % ('acc', acc * 100))
where I stored my test data at '/content/gdrive/My Drive/Car-Recognition/data/test' but I got the following error
ValueError Traceback (most recent call last)
in ()
9
10
---> 11 y_pred, y_test = predict('/content/gdrive/My Drive/Car-Recognition/data/test', model)
12 acc = calc_acc(y_pred, y_test)
13 print("%s: %.2f%%" % ('acc', acc * 100))
How can we find the testing accuracy?
I ran the following code
y_pred, y_test = predict('/content/gdrive/My Drive/Car-Recognition/data/test', model)
acc = calc_acc(y_pred, y_test)
print("%s: %.2f%%" % ('acc', acc * 100))
where I stored my test data at '/content/gdrive/My Drive/Car-Recognition/data/test' but I got the following error
ValueError Traceback (most recent call last)
in ()
9
10
---> 11 y_pred, y_test = predict('/content/gdrive/My Drive/Car-Recognition/data/test', model)
12 acc = calc_acc(y_pred, y_test)
13 print("%s: %.2f%%" % ('acc', acc * 100))
How can we find the testing accuracy?
I ran the following code
y_pred, y_test = predict('/content/gdrive/My Drive/Car-Recognition/data/test', model)
acc = calc_acc(y_pred, y_test)
print("%s: %.2f%%" % ('acc', acc * 100))
where I stored my test data at '/content/gdrive/My Drive/Car-Recognition/data/test' but I got the following error
ValueError Traceback (most recent call last)
in ()
9
10
---> 11 y_pred, y_test = predict('/content/gdrive/My Drive/Car-Recognition/data/test', model)
12 acc = calc_acc(y_pred, y_test)
13 print("%s: %.2f%%" % ('acc', acc * 100))
in predict(img_dir, model)
19 y_pred.append(pred_label)
20 tokens = img_path.split(os.path.sep)
---> 21 class_id = int(tokens[-2])
22 # print(str(class_id))
23 y_test.append(class_id)
ValueError: invalid literal for int() with base 10: 'test'
The text was updated successfully, but these errors were encountered: