Xzzit / pytorch-tutorial

Introduction to PyTorch: A comprehensive Chinese course available at the provided link.
https://space.bilibili.com/12580263/channel/series
GNU General Public License v3.0
11 stars 4 forks source link

04_CNN中的cnn_test.py #6

Open tangfangduol opened 1 year ago

tangfangduol commented 1 year ago

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

Xzzit commented 1 year ago

你好!看起来像是路径的问题,你可以看看D:\cnn练习\pytorch-tutorial-main\02_dataset\目录下,有my-mnist这个文件夹吗?