随着pytorch的CNN模型开始训练,错误如下:
OSError: Traceback (most recent call last):
File "X:\soft\task\taskinstalled\Anaconda3\envs\dogged\lib\site-packages\torch\utils\data\dataloader.py", line 138, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "X:\soft\task\taskinstalled\Anaconda3\envs\dogged\lib\site-packages\torch\utils\data\dataloader.py", line 138, in <listcomp>
samples = collate_fn([dataset[i] for i in batch_indices])
File "X:\soft\task\taskinstalled\Anaconda3\envs\dogged\lib\site-packages\torchvision\datasets\folder.py", line 132, in __getitem__
sample = self.loader(path)
File "X:\soft\task\taskinstalled\Anaconda3\envs\dogged\lib\site-packages\torchvision\datasets\folder.py", line 178, in default_loader
return pil_loader(path)
File "X:\soft\task\taskinstalled\Anaconda3\envs\dogged\lib\site-packages\torchvision\datasets\folder.py", line 161, in pil_loader
return img.convert('RGB')
File "X:\soft\task\taskinstalled\Anaconda3\envs\dogged\lib\site-packages\PIL\Image.py", line 844, in convert
self.load()
File "X:\soft\task\taskinstalled\Anaconda3\envs\dogged\lib\site-packages\PIL\ImageFile.py", line 226, in load
"(%d bytes not processed)" % len(b))
OSError: image file is truncated (150 bytes not processed)