File "D:/Program Files/pycharm-professional-2018.1/project/captcha_identify.torch-master/train.py", line 51, in main
acc = test.testdata("./weights/cnn%03g.pt" % epoch)
File "D:\Program Files\pycharm-professional-2018.1\project\captcha_identify.torch-master\test.py", line 56, in test_data
test_dataloader = datasets.get_test_data_loader()
File "D:\Program Files\pycharm-professional-2018.1\project\captcha_identify.torch-master\datasets.py", line 47, in get_test_data_loader
return DataLoader(dataset, batch_size=1, shuffle=True)
File "D:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 213, in init
sampler = RandomSampler(dataset)
File "D:\ProgramData\Anaconda3\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
请教一下 这个 num_samples 设置多少呀
if not isinstance(self.num_samples, int) or self.num_samples <= 0:
File "D:/Program Files/pycharm-professional-2018.1/project/captcha_identify.torch-master/train.py", line 51, in main acc = test.testdata("./weights/cnn%03g.pt" % epoch) File "D:\Program Files\pycharm-professional-2018.1\project\captcha_identify.torch-master\test.py", line 56, in test_data test_dataloader = datasets.get_test_data_loader() File "D:\Program Files\pycharm-professional-2018.1\project\captcha_identify.torch-master\datasets.py", line 47, in get_test_data_loader return DataLoader(dataset, batch_size=1, shuffle=True) File "D:\ProgramData\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 213, in init sampler = RandomSampler(dataset) File "D:\ProgramData\Anaconda3\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
请教一下 这个 num_samples 设置多少呀
if not isinstance(self.num_samples, int) or self.num_samples <= 0: