Unverified 提交 251aeafc authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Update P5 + P6 model ensembling (#3082)

上级 d2a17289
......@@ -130,7 +130,8 @@ def attempt_load(weights, map_location=None, inplace=True):
if len(model) == 1:
return model[-1] # return model
else:
print('Ensemble created with %s\n' % weights)
for k in ['names', 'stride']:
print(f'Ensemble created with {weights}\n')
for k in ['names']:
setattr(model, k, getattr(model[-1], k))
model.stride = model[torch.argmax(torch.tensor([m.stride.max() for m in model])).int()].stride # max stride
return model # return ensemble
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论