--img-size stride-multiple verification

This commit is contained in:
Glenn Jocher committed 2020-06-12 22:10:46 -07:00
1 parent 4ba47b1b1b
commit 099e6f5ebd
4 files changed
+11 -4

No files matched your search

+1 -3
View File
@@ -80,9 +80,7 @@ def train(hyp):
# Image sizes
gs = int(max(model.stride)) # grid size (max stride)
if any(x % gs != 0 for x in opt.img_size):
print('WARNING: --img-size %g,%g must be multiple of %s max stride %g' % (*opt.img_size, opt.cfg, gs))
imgsz, imgsz_test = [make_divisible(x, gs) for x in opt.img_size] # image sizes (train, test)
imgsz, imgsz_test = [check_img_size(x, gs) for x in opt.img_size] # verify imgsz are gs-multiples
# Optimizer
nbs = 64 # nominal batch size