hello,it's a very good idea to solve some problems in semantic segmentation,but a error appeared when i run the code which i can't handle.Wish that you can give me reply.
epoch:0,test loss:nan
epoch:0,test loss:nan
epoch:0,test loss:nan
epoch:0,test loss:nan
epoch:0,test loss:nan
epoch:0,test loss:nan
epoch:0,test loss:nan
Traceback (most recent call last):
File "D:/python-code/PAN/pytorch-Pyramid-Attention-Networks-PAN--master/pan+cityspaces/train.py", line 226, in
best_pred = validation(epoch,best_pred)
File "D:/python-code/PAN/pytorch-Pyramid-Attention-Networks-PAN--master/pan+cityspaces/train.py", line 184, in validation
for iteration,batch in enumerate(val_loader):
File "E:\anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 346, in next
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "E:\anaconda\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\anaconda\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\python-code\PAN\pytorch-Pyramid-Attention-Networks-PAN--master\pan+cityspaces\data\Cityscapes.py", line 50, in getitem
_img = Image.open(img_path).convert('RGB')
File "E:\anaconda\lib\site-packages\PIL\Image.py", line 930, in convert
self.load()
File "E:\anaconda\lib\site-packages\PIL\ImageFile.py", line 272, in load
raise_ioerror(err_code)
File "E:\anaconda\lib\site-packages\PIL\ImageFile.py", line 59, in raise_ioerror
raise IOError(message + " when reading image file")
OSError: unrecognized data stream contents when reading image file
hello,it's a very good idea to solve some problems in semantic segmentation,but a error appeared when i run the code which i can't handle.Wish that you can give me reply.
epoch:0,test loss:nan epoch:0,test loss:nan epoch:0,test loss:nan epoch:0,test loss:nan epoch:0,test loss:nan epoch:0,test loss:nan epoch:0,test loss:nan Traceback (most recent call last): File "D:/python-code/PAN/pytorch-Pyramid-Attention-Networks-PAN--master/pan+cityspaces/train.py", line 226, in
best_pred = validation(epoch,best_pred)
File "D:/python-code/PAN/pytorch-Pyramid-Attention-Networks-PAN--master/pan+cityspaces/train.py", line 184, in validation
for iteration,batch in enumerate(val_loader):
File "E:\anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 346, in next
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "E:\anaconda\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\anaconda\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\python-code\PAN\pytorch-Pyramid-Attention-Networks-PAN--master\pan+cityspaces\data\Cityscapes.py", line 50, in getitem
_img = Image.open(img_path).convert('RGB')
File "E:\anaconda\lib\site-packages\PIL\Image.py", line 930, in convert
self.load()
File "E:\anaconda\lib\site-packages\PIL\ImageFile.py", line 272, in load
raise_ioerror(err_code)
File "E:\anaconda\lib\site-packages\PIL\ImageFile.py", line 59, in raise_ioerror
raise IOError(message + " when reading image file")
OSError: unrecognized data stream contents when reading image file