diff --git a/examples/cats_and_dogs.ipynb b/examples/cats_and_dogs.ipynb index 74f40ecc..6c84fdd6 100644 --- a/examples/cats_and_dogs.ipynb +++ b/examples/cats_and_dogs.ipynb @@ -276,12 +276,12 @@ } ], "source": [ - "random_idx = np.random.randint(1, len(train_list), size=9)\n", + "random_idx = np.random.randint(0, len(train_list), size=9)\n", "fig, axes = plt.subplots(3, 3, figsize=(16, 12))\n", "\n", "for idx, ax in enumerate(axes.ravel()):\n", - " img = Image.open(train_list[idx])\n", - " ax.set_title(labels[idx])\n", + " img = Image.open(train_list[random_idx[idx]])\n", + " ax.set_title(labels[random_idx[idx]])\n", " ax.imshow(img)\n" ] }, @@ -6248,4 +6248,4 @@ }, "nbformat": 4, "nbformat_minor": 1 -} \ No newline at end of file +}