RuntimeError: Found 0 files in subfolders of: ./data/image Supported extensions are: .jpg,.jpeg,.png

输入代码

train_data = datasets.ImageFolder('./data/image', transform = my_trans)

RuntimeError: Found 0 files in subfolders of: ./data/image Supported extensions are: .jpg,.jpeg,.png_第1张图片

运行错误提示

RuntimeError: Found 0 files in subfolders of: ./data/image
Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif,.tiff,.webp

解决办法

需要将image下再建立一个文件夹,然后把图片放里面就行了
RuntimeError: Found 0 files in subfolders of: ./data/image Supported extensions are: .jpg,.jpeg,.png_第2张图片
运行代码还是

train_data = datasets.ImageFolder('./data/image', transform = my_trans)

这时候就会成功了!

你可能感兴趣的:(jupyter)