train and val size 8308
traub suze 8308
Loading weights into state dict...
Finished!
Traceback (most recent call last):
File "/gs/home/zy2010128/yolov4-pytorch-master/train.py", line 255, in <module>
drop_last=True, collate_fn=yolo_dataset_collate)
File "/gs/home/zy2010128/anaconda/envs/nucleus/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 224, in __init__
sampler = RandomSampler(dataset, generator=generator)
File "/gs/home/zy2010128/anaconda/envs/nucleus/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 96, 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
本地训练没有出错,将shuffle改为False后无报错,但…
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/88383824ca8f3a93b4774f2be5f0d6a2.png)
还未尝试。
解决:
dataset读取有问题,路径问题,没有访问到class_txt文件。shuffle=True。