超分入门,希望在本周能够成功跑通此模型代码,代码链接。
ValueError: num_samples should be a positive integer value, but got num_samples=0
具体信息如下:
Traceback (most recent call last):
File "main.py", line 33, in <module>
main()
File "main.py", line 22, in main
loader = data.Data(args)
File "/home/wlj/git/EDSR-PyTorch-master/src/data/__init__.py", line 31, in __init__
num_workers=args.n_threads,
File "/home/wlj/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 213, in __init__
sampler = RandomSampler(dataset)
File "/home/wlj/anaconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 94, in __init__
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0
这是因为路径错误所致,可参考此链接,修改--dir_data
参数至正确路径即可。
2. EOFError: Ran out of input
发现是合成的二进制.pt文件有问题,再次生成一遍就没有问题了。