Age-and-Gender icon indicating copy to clipboard operation
Age-and-Gender copied to clipboard

train报错

Open Rzzzj opened this issue 1 year ago • 0 comments

C:\Users\86153\anaconda3\envs\pytorch_gpu_cpu\python.exe E:\Age-and-Gender-master\train.py C:\Users\86153\anaconda3\envs\pytorch_gpu_cpu\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: warn(f"Failed to load image Python extension: {e}") Traceback (most recent call last): File "E:\Age-and-Gender-master\train.py", line 235, in main() File "E:\Age-and-Gender-master\train.py", line 231, in main train_net(args) File "E:\Age-and-Gender-master\train.py", line 63, in train_net pin_memory=True) File "C:\Users\86153\anaconda3\envs\pytorch_gpu_cpu\lib\site-packages\torch\utils\data\dataloader.py", line 347, in init sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File "C:\Users\86153\anaconda3\envs\pytorch_gpu_cpu\lib\site-packages\torch\utils\data\sampler.py", line 108, 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

Process finished with exit code 1 运行train时报这个错误

Rzzzj avatar Apr 25 '23 02:04 Rzzzj