updates
This commit is contained in:
parent
27c75b5210
commit
999463fbbd
|
@ -51,6 +51,10 @@ def create_modules(module_defs, img_size, arc):
|
|||
modules = maxpool
|
||||
|
||||
elif mdef['type'] == 'upsample':
|
||||
if ONNX_EXPORT: # explicitly state size, avoid scale_factor
|
||||
g = (yolo_index + 1) * 2
|
||||
modules = nn.Upsample(size=(10 * g, 6 * g), mode='nearest') # assume img_size = (320, 192)
|
||||
else:
|
||||
modules = nn.Upsample(scale_factor=int(mdef['stride']), mode='nearest')
|
||||
|
||||
elif mdef['type'] == 'route': # nn.Sequential() placeholder for 'route' layer
|
||||
|
|
Loading…
Reference in New Issue