Skip to content

Commit 8a758e2

Browse files
Merge pull request #4 from Rud09/patch-2
Fixed Plot Error
2 parents 80ca1d9 + ab92c62 commit 8a758e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Traffic_Sign_Classifier.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,12 +1432,13 @@
14321432
"print(\"New Images Test Accuracy = {:.1f}%\".format(test_accuracy*100))\n",
14331433
"\n",
14341434
"plt.figure(figsize=(15, 16))\n",
1435-
"for i in range(len(new_test_images_preprocessed)):\n",
1436-
" plt.subplot(5, 2, 2*i+1)\n",
1435+
"new_test_images_len=len(new_test_images_preprocessed)\n",
1436+
"for i in range(new_test_images_len):\n",
1437+
" plt.subplot(new_test_images_len, 2, 2*i+1)\n",
14371438
" plt.imshow(new_test_images[i]) \n",
14381439
" plt.title(signs[y_pred[i][0]])\n",
14391440
" plt.axis('off')\n",
1440-
" plt.subplot(5, 2, 2*i+2)\n",
1441+
" plt.subplot(new_test_images_len, 2, 2*i+2)\n",
14411442
" plt.barh(np.arange(1, 6, 1), y_prob[i, :])\n",
14421443
" labels = [signs[j] for j in y_pred[i]]\n",
14431444
" plt.yticks(np.arange(1, 6, 1), labels)\n",

0 commit comments

Comments
 (0)