If I Change the batchsize
to 1
with faster RCNN 640x640
and ResNet 50
as Backbone,
I get the following Error:
The 'global_batch_size' 1 is not divisible by 'num_replicas_in_sync' 4
How can I set the batchsize to 1?
If I Change the batchsize
to 1
with faster RCNN 640x640
and ResNet 50
as Backbone,
I get the following Error:
The 'global_batch_size' 1 is not divisible by 'num_replicas_in_sync' 4
How can I set the batchsize to 1?
Copyright © 2021 Jogjafile Inc.
As you may imagine, the problem in your case is that you are actually trying to use 4 video cards/devices (
num_replicas_in_sync
), but your batch_size is 1. Needless to say, you cannot train with 1 batch size to with on 4 devices.There are two solutions:
num_replicas_in_sync
to 1.global_batch_size
to a value which is divisible by 4 (4,8,12 etc.)