Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

老师您好,程序测试的时候出现了一点问题 #15

Open
ArgentumHook opened this issue Jan 17, 2025 · 4 comments
Open

老师您好,程序测试的时候出现了一点问题 #15

ArgentumHook opened this issue Jan 17, 2025 · 4 comments

Comments

@ArgentumHook
Copy link

我按照readme里面要求的第三方库版本进行配置,然后下载好了预训练模型,在运行脚本
python main.py --mode test --version UEGAN-FiveK --pretrained_model 92 --is_test_nima True --is_test_psnr_ssim True的时候出了以下错误:
File "C:\Users\argen\Documents.code\UEGAN\data_loader.py", line 118, in _fetch_refs
x, y, name = next(self.iter)
AttributeError: 'InputFetcher' object has no attribute 'iter'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 62, in
main(args)
File "main.py", line 50, in main
tester.test()
File "C:\Users\argen\Documents.code\UEGAN\tester.py", line 64, in test
input = next(self.fetcher_test)
File "C:\Users\argen\Documents.code\UEGAN\data_loader.py", line 125, in next
x, y, img_name = self._fetch_refs()
File "C:\Users\argen\Documents.code\UEGAN\data_loader.py", line 121, in _fetch_refs
x, y, name = next(self.iter)
File "C:\Users\argen\AppData\Local\Programs\miniconda3\envs\UEGAN\lib\site-packages\torch\utils\data\dataloader.py", line 345, in next
data = self._next_data()
File "C:\Users\argen\AppData\Local\Programs\miniconda3\envs\UEGAN\lib\site-packages\torch\utils\data\dataloader.py", line 856, in _next_data
return self._process_data(data)
File "C:\Users\argen\AppData\Local\Programs\miniconda3\envs\UEGAN\lib\site-packages\torch\utils\data\dataloader.py", line 881, in _process_data
data.reraise()
File "C:\Users\argen\AppData\Local\Programs\miniconda3\envs\UEGAN\lib\site-packages\torch_utils.py", line 394, in reraise
raise self.exc_type(msg)
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\argen\AppData\Local\Programs\miniconda3\envs\UEGAN\lib\site-packages\torch\utils\data_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\argen\AppData\Local\Programs\miniconda3\envs\UEGAN\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\argen\AppData\Local\Programs\miniconda3\envs\UEGAN\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\argen\Documents.code\UEGAN\data_loader.py", line 60, in getitem
_, img_name = img_name.rsplit('/', 1)
ValueError: not enough values to unpack (expected 2, got 1)
希望老师可以解答一下,谢谢

@ArgentumHook
Copy link
Author

软件包的版本如下
Python==3.6.15
tensorboard==1.14.0
tensorflow==1.14.0
torch==1.4.0
torchvision==0.5.0
tqdm==4.43.0
numpy==1.16.0
opencv-python==4.5.5.64
munch==2.5.0
scipy==1.5.4

@eezkni
Copy link
Owner

eezkni commented Jan 19, 2025

请使用我们提供数据集类似的命名格式重新命名你们的测试图片。

@ArgentumHook
Copy link
Author

请使用我们提供数据集类似的命名格式重新命名你们的测试图片。

已经按要求重新命名了,但还是出现同样的错误信息

@ArgentumHook
Copy link
Author

ArgentumHook commented Jan 20, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants