sanghyun-son / EDSR-PyTorch

PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)
MIT License
2.42k stars 668 forks source link

i need help,thanks! ValueError: num_samples should be a positive integer value, but got num_samples=0 #276

Open Hunter-Murphy opened 4 years ago

Hunter-Murphy commented 4 years ago

when i used the “” to train the EDSR model from the scratch,i met the error : Traceback (most recent call last): File "main.py", line 33, in main() File "main.py", line 22, in main loader = data.Data(args) File "E:\红外成像仪\code\EDSR-PyTorch-master\src\data__init.py", line 34, in init num_workers=args.n_threads, File "C:\ProgramData\Anaconda3\envs\py37pt0.4.1\lib\site-packages\torch\utils\data\dataloader.py", line 213, in init sampler = RandomSampler(dataset) File "C:\ProgramData\Anaconda3\envs\py37pt0.4.1\lib\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

what can i do to solve it ?i deed help, thanks.

JaChouSSS commented 3 years ago

add the '--test_only' after your test commend

JaChouSSS commented 3 years ago

@Hunter-Murphy

Hunter-Murphy commented 3 years ago

thanks very very much!!but i still encounter some severe errors when i reimplement the source code of the EDSR using my own datasets,i want to ask you some questions,here is my email address(murphy.ai@qq.com).May I ask your email addressl?thanks again

Hunter-Murphy commented 3 years ago

@JaChouSSS

JaChouSSS commented 3 years ago

@JaChouSSS

hi,my email is jaychou10261026@163.com

yjt9299 commented 3 years ago

Did you solve the problem? How? Thank you i also meet this problem when i use the " python main.py --model EDSR --scale 2 --save edsr_x2 --n_resblocks 32 --n_feats 256 --res_scale 0.1 --reset --ext sep-reset " to train the model

yjt9299 commented 3 years ago

@Hunter-Murphy

yjt9299 commented 3 years ago

add the '--test_only' after your test commend

If i want train the model and i meet this error how can i solve it ? Thank u

yjt9299 commented 3 years ago

i get it . i made a mistake on the dir_data

Hunter-Murphy commented 3 years ago

Not yet,i am still trying to solve it! Cause im busy these days,but i will try to solve it again in the next few days. Just keep in touch! thanks for you help!@yjt9299

flag16 commented 3 years ago

I have the same problem with you. If you have solved the problem please help me. Thanks. e-mail:954723924@qq.com @Hunter-Murphy

qizhou000 commented 3 years ago

看这个邮箱好像都是中国老铁啊

fac33 commented 2 years ago

@yjt9299 Not so sure if you can explain more on how you could solve the problem? It looks like I had encounter the same issue here and though I change my dir_data's default directory for several times it still not works. By the way you can contact me through cfy_98@126.com. Thanks again!

WithWheat commented 2 years ago

@fac33 @qizhou000 @Hunter-Murphy @flag16 Hi, guys! Just change the 'dir_data' in 'option.py' correctly then this bug will be fixed. For example, you can do it like this, '/home/aaa/bbb/DIV2K/'--->'/home/aaa/bbb/' Hope this works.

baba1587 commented 2 years ago

@fac33 @qizhou000 @Hunter-Murphy @flag16 Hi, guys! Just change the 'dir_data' in 'option.py' correctly then this bug will be fixed. For example, you can do it like this, '/home/aaa/bbb/DIV2K/'--->'/home/aaa/bbb/' Hope this works.

thank you for your help

TiamoV58756565745345 commented 2 years ago

I have the same problem with you. If you have solved the problem please help me. Thanks. e-mail:[429688152@qq.com] @Hunter-Murphy