ValueError: num_samples should be a positive integer value, but got num_samp=0
ValueError: num_samples should be a positive integer value, but got num_samp=0
·
在用PyCharm跑代码时发现出现ValueError: num_samples should be a positive integer value, but got num_samp=0
经排查,发现原因在于调用DataLoder时,将其shuffle设置为了True。只需将shuffle设置为False即可。
train_loader = DataLoader(self.dataset_, num_workers=num_worker,
batch_size=self.batch_size_, shuffle=False)
更多推荐
所有评论(0)