motokimura / PyTorch_Gaussian_YOLOv3

PyTorch implementation of Gaussian YOLOv3 (including training code for COCO dataset)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot work with batch size 32 in cocoapi_evaluator.py

JohnPekl opened this issue · comments

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`

Unfortunately, the evaluator only supports the case with batch size is one.

Your PR is more than welcome.