D:\anaconda\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: '[WinError 127] 找不到指定的程序。'If you don't plan on using image functionality from torchvision.io, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have libjpeg or libpng installed before building torchvision from source?
warn(
Traceback (most recent call last):
File "D:\cnn练习\pytorch-tutorial-main\04_CNN\cnn_test.py", line 22, in
my_mnist = ImageFolder(root='../02_dataset/my-mnist', transform=transform)
File "D:\anaconda\lib\site-packages\torchvision\datasets\folder.py", line 309, in init
super().init(
File "D:\anaconda\lib\site-packages\torchvision\datasets\folder.py", line 145, in init
samples = self.make_dataset(self.root, class_to_idx, extensions, is_valid_file)
File "D:\anaconda\lib\site-packages\torchvision\datasets\folder.py", line 189, in make_dataset
return make_dataset(directory, class_to_idx, extensions=extensions, is_valid_file=is_valid_file)
File "D:\anaconda\lib\site-packages\torchvision\datasets\folder.py", line 102, in make_dataset
raise FileNotFoundError(msg)
FileNotFoundError: Found no valid file for the classes MNIST. Supported extensions are: .jpg, .jpeg, .png, .ppm, .bmp, .pgm, .tif, .tiff, .webp
D:\anaconda\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: '[WinError 127] 找不到指定的程序。'If you don't plan on using image functionality from
my_mnist = ImageFolder(root='../02_dataset/my-mnist', transform=transform)
File "D:\anaconda\lib\site-packages\torchvision\datasets\folder.py", line 309, in init
super().init(
File "D:\anaconda\lib\site-packages\torchvision\datasets\folder.py", line 145, in init
samples = self.make_dataset(self.root, class_to_idx, extensions, is_valid_file)
File "D:\anaconda\lib\site-packages\torchvision\datasets\folder.py", line 189, in make_dataset
return make_dataset(directory, class_to_idx, extensions=extensions, is_valid_file=is_valid_file)
File "D:\anaconda\lib\site-packages\torchvision\datasets\folder.py", line 102, in make_dataset
raise FileNotFoundError(msg)
FileNotFoundError: Found no valid file for the classes MNIST. Supported extensions are: .jpg, .jpeg, .png, .ppm, .bmp, .pgm, .tif, .tiff, .webp
torchvision.io
, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you havelibjpeg
orlibpng
installed before buildingtorchvision
from source? warn( Traceback (most recent call last): File "D:\cnn练习\pytorch-tutorial-main\04_CNN\cnn_test.py", line 22, in