Hello,
I have two separate directories in an "image" directory to test the network. Inside these two folders, there are 742 and 661 images sequentially. When I specify the batch size as 1 for testing, my code works without any issues. However, I want to accelerate the testing speed by specifying the batch size as 10.
In model.py file, the following assertion
assert len(images) == self.config.BATCH_SIZE, "len(images) must be equal to BATCH_SIZE"
is making my code to skip the last few images at the last iteration of testing. I have had a few attempts for solving the issue and I can share them if necessary. How can we do such a change that the code can do the following:
1) will create a list of 10 images, and then clear the list after evaluation.
2) will be able to reduce the batch size in the last iteration.
Thank you for creating and developing this repository again.
GPU_COUNT = 1
IMAGES_PER_GPU = 2
The batch_size was calculated by GPU_COUNT*IMAGES_PER_GPU
You may want to incread the IMAGES_PER_GPU to increase the Batch_size. You may want to make sure the last batch contains the same number of images as the BATCH_SIZE other wise the assertion you mentioned will fail.
I am having the same issue. How do you modify the last batch_size?
@canerozer @apyrros
Please check this PR #1082, it works for me.
Most helpful comment
I am having the same issue. How do you modify the last batch_size?