-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about batch and subdivisions #1736
Comments
The weights will be updated for each mini_batch = Lines 315 to 326 in 24b6045
float train_network_datum(network net, float *x, float *y) { ... Line 290 in 24b6045
|
Thanks |
@AlexeyAB Sorry for resurrecting this. If the condition to decide whether to update the network is For example:
Case 1: net.seen = 60
Case 2: net.seen = 128
|
@ydixon Yes, weights will be updated for each |
@AlexeyAB Thanks for the quick response! |
@AlexeyAB , Can I train with batch=128 so that the trained model is more generalized than when batch=64? And then in that case, maybe I will have to train for almost the double number of iterations than when batch=64? So, the batch size could be a hyper parameter impacting mAP... is my understanding correct? |
@AlexeyAB Hi, I have 200k images and about 200 classes and I have two GPUs RTX 2080 Ti. My model is Gaussian.cfg, I want to know what is the batch and subdivisions should I set? Thanks is advance. |
batch=64 subdivisions=16 the lower subdivisions the better. |
@AlexeyAB Hi, Thanks, Can I stop the training and change the subdivisions and continue the training again? |
yes |
From this cfg,
batch=64
,subdivision=16
. Therefore, real batch size should be64 / 16 = 4
.My question is whether the gradients of 64 images are accumulated before updating the model or gradients of 4 images are updated every iteration?
The text was updated successfully, but these errors were encountered: