Update min warmup iterations from 1k to 100 (#6768)
Browse files
train.py
CHANGED
@@ -268,7 +268,7 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
|
|
268 |
|
269 |
# Start training
|
270 |
t0 = time.time()
|
271 |
-
nw = max(round(hyp['warmup_epochs'] * nb),
|
272 |
# nw = min(nw, (epochs - start_epoch) / 2 * nb) # limit warmup to < 1/2 of training
|
273 |
last_opt_step = -1
|
274 |
maps = np.zeros(nc) # mAP per class
|
|
|
268 |
|
269 |
# Start training
|
270 |
t0 = time.time()
|
271 |
+
nw = max(round(hyp['warmup_epochs'] * nb), 100) # number of warmup iterations, max(3 epochs, 100 iterations)
|
272 |
# nw = min(nw, (epochs - start_epoch) / 2 * nb) # limit warmup to < 1/2 of training
|
273 |
last_opt_step = -1
|
274 |
maps = np.zeros(nc) # mAP per class
|