Lesson 1 minor bugfix

Hi there!

Thanks for an awesome course! I’ve tried to run it for my own dataset I’ve created (dragonflies vs butterflies) and got incredible 0.9869 accuracies from the first try:
https://github.com/vborees/fastai/blob/master/lesson1/model_dragonfly_butterfly/lesson1-dragonfly-butterfly.ipynb

As you can see, I got two error messages because of so incredible results.

  1. Cell 26, when tried to show Incorrectly classified, a ValueError occurred because there are less than 4 incorrectly classified images and np.random.choice could not get 4 out of 2.
  2. Cell 35 gives ‘<Figure size 1152x576 with 0 Axes>’, because there all butterflies have been classified correctly. Fix: if there are no images, do not plot, but just print a message.

There are minor fixes for that in the pull request I created: https://github.com/fastai/fastai/pull/744

1 Like