Cannot work with batch size 32 in cocoapi_evaluator.py
JohnPekl opened this issue · comments
John Pekl commented
Can we work with batch size greater than 1 in evaluator?
If I change batch size from 1 to 32, it has an error.
self.dataset, batch_size=32, shuffle=False, num_workers=4)
`File "/home/computer/PyTorch_Gaussian_YOLOv3-master/train.py", line 173, in main
ap = evaluator.evaluate(model)
File "/media/computer/PyTorch_Gaussian_YOLOv3-master/utils/cocoapi_evaluator.py", line 69, in evaluate
info_img = [float(info) for info in info_img]
File "/media/computer/PyTorch_Gaussian_YOLOv3-master/utils/cocoapi_evaluator.py", line 69, in <listcomp>
info_img = [float(info) for info in info_img]
ValueError: only one element tensors can be converted to Python scalars`
Motoki Kimura commented
Unfortunately, the evaluator only supports the case with batch size is one.
Motoki Kimura commented
Your PR is more than welcome.