Lesson 3 - Official Topic

Have you opened jupyter notebook in terminal first?

Yes, exactly

Maybe you have cd to wrong dircetory, so it can’t see the folder, or I have no idea.

a quick fix

Fix Truncated Images Error:

  • Import the following:
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True 
  • This is to force PIL to open truncated images that it would normally not open, such as:
    • An image with a file extension that does not match its type (e.g. jpg file extension with a .png file type) usually removed in previouse steps )
    • An image with an alpha channel that PIL does not support (e.g. RGBA)
  • Add the import before running your learner:
    • learn = vision_learner(dls, resnet18, metrics=error_rate)
    • learn.fine_tune(4)

Thanks.