Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- OSError Traceback (most recent call last)
- <ipython-input-18-b8aafda42618> in <module>()
- 8 epoch_examples = 0
- 9
- ---> 10 for images, labels in trainloader:
- 11 step += 1
- 12 print("Starting epoch {}, step {}".format(e+1, step))
- /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __next__(self)
- 613 if self.num_workers == 0: # same-process loading
- 614 indices = next(self.sample_iter) # may raise StopIteration
- --> 615 batch = self.collate_fn([self.dataset[i] for i in indices])
- 616 if self.pin_memory:
- 617 batch = pin_memory_batch(batch)
- /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in <listcomp>(.0)
- 613 if self.num_workers == 0: # same-process loading
- 614 indices = next(self.sample_iter) # may raise StopIteration
- --> 615 batch = self.collate_fn([self.dataset[i] for i in indices])
- 616 if self.pin_memory:
- 617 batch = pin_memory_batch(batch)
- /usr/local/lib/python3.6/dist-packages/torchvision/datasets/folder.py in __getitem__(self, index)
- 99 """
- 100 path, target = self.samples[index]
- --> 101 sample = self.loader(path)
- 102 if self.transform is not None:
- 103 sample = self.transform(sample)
- /usr/local/lib/python3.6/dist-packages/torchvision/datasets/folder.py in default_loader(path)
- 145 return accimage_loader(path)
- 146 else:
- --> 147 return pil_loader(path)
- 148
- 149
- /usr/local/lib/python3.6/dist-packages/torchvision/datasets/folder.py in pil_loader(path)
- 127 # open path as file to avoid ResourceWarning (https://github.com/python-pillow/Pillow/issues/835)
- 128 with open(path, 'rb') as f:
- --> 129 img = Image.open(f)
- 130 return img.convert('RGB')
- 131
- /usr/local/lib/python3.6/dist-packages/PIL/Image.py in open(fp, mode)
- 2450 fp.close()
- 2451 raise IOError("cannot identify image file %r"
- -> 2452 % (filename if filename else fp))
- 2453
- 2454 #
- OSError: cannot identify image file <_io.BufferedReader name='flower_data/train/101/image_07973.jpg'>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement