This commit is contained in:
Glenn Jocher 2019-06-12 11:35:53 +02:00
parent 01e11aee04
commit 051b251d41
1 changed files with 3 additions and 1 deletions

View File

@ -244,7 +244,9 @@ def train(
# Multi-Scale training (320 - 608 pixels) every 10 batches
if multi_scale and (i + 1) % 10 == 0:
dataset.img_size = random.choice(range(10, 20)) * 32
min_size = round(img_size / 32 / 1.5)
max_size = round(img_size / 32 * 1.5)
dataset.img_size = random.choice(range(min_size, max_size + 1)) * 32
print('multi_scale img_size = %g' % dataset.img_size)
# Calculate mAP (always test final epoch, skip first 5 if opt.nosave)