This commit is contained in:
Glenn Jocher 2019-06-12 14:15:28 +02:00
parent 59cf3978fc
commit bca423ee43
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ def train(
if opt.multi_scale:
if (i + 1 + nb * epoch) % 10 == 0: #  adjust (67% - 150%) every 10 batches
img_size = random.choice(range(img_size_min, img_size_max + 1)) * 32
print('multi_scale img_size = %g' % img_size)
print('img_size = %g' % img_size)
scale_factor = img_size / max(imgs.shape[-2:])
imgs = F.interpolate(imgs, scale_factor=scale_factor, mode='bilinear', align_corners=False)