This commit is contained in:
Glenn Jocher 2020-01-30 12:40:05 -08:00
parent 999463fbbd
commit 2e4650e013
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ def create_modules(module_defs, img_size, arc):
elif mdef['type'] == 'upsample': elif mdef['type'] == 'upsample':
if ONNX_EXPORT: # explicitly state size, avoid scale_factor if ONNX_EXPORT: # explicitly state size, avoid scale_factor
g = (yolo_index + 1) * 2 g = (yolo_index + 1) * 2 # gain
modules = nn.Upsample(size=(10 * g, 6 * g), mode='nearest') # assume img_size = (320, 192) modules = nn.Upsample(size=(10 * g, 6 * g), mode='nearest') # assume img_size = (320, 192)
else: else:
modules = nn.Upsample(scale_factor=int(mdef['stride']), mode='nearest') modules = nn.Upsample(scale_factor=int(mdef['stride']), mode='nearest')