youyuge34/Anime-InPainting

why num_samples should be a positive integeral value, but got num_samples=0

zhangbaijin opened this issue · 5 comments

why num_samples should be a positive integeral value, but got num_samples=0

@zhangbaijin Please attach the whole console error log~

image你好- - 我是windows系统 直接在命令行训练,出现这样的情况,用tool测试的时候为啥会出现以下情况,谢谢大神解答~~~
image

File "train.py", line 4, in
main(mode=1)
File "E:\python projects\Anime-InPainting-master\main.py", line 55, in main
model.train()
File "E:\python projects\Anime-InPainting-master\src\edge_connect.py", line 88, in train
shuffle=True
File "C:\ProgramData\Anaconda3\envs\torch\lib\site-packages\torch\utils\data\dataloader.py", line 802, in init
sampler = RandomSampler(dataset)
File "C:\ProgramData\Anaconda3\envs\torch\lib\site-packages\torch\utils\data\sampler.py", line 64, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integeral value, but got num_samples=0

In training phase, the model cannot get the correct position of datasets, check and edit the datasets directory in config.yaml.
In the tool testing, It seems that the model cannot get the correct edge. There could be lots of potential possibilities(e.g. Your pressed the false key...). Try more time on debugging by yourself. It runs smoothly on my win10.