Open baselmousi opened 4 years ago
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'
Can you run the train.py?
You can check test accuracy thorugh online evaluation. There is a link given on the github.
Get Outlook for Androidhttps://aka.ms/ghei36
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)