Unverified 提交 03ebe6ea authored 作者: lorne's avatar lorne 提交者: GitHub

Add nn.SiLU inplace in attempt_load() (#1940)

* sleep 3 sec to load data . * Update train.py * Add nn.SiLU inplace in attempt_load() Co-authored-by: 's avatarwangliang <wangliang@codingapi.com> Co-authored-by: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com>
上级 777032ef
......@@ -119,7 +119,7 @@ def attempt_load(weights, map_location=None):
# Compatibility updates
for m in model.modules():
if type(m) in [nn.Hardswish, nn.LeakyReLU, nn.ReLU, nn.ReLU6]:
if type(m) in [nn.Hardswish, nn.LeakyReLU, nn.ReLU, nn.ReLU6, nn.SiLU]:
m.inplace = True # pytorch 1.7.0 compatibility
elif type(m) is Conv:
m._non_persistent_buffers_set = set() # pytorch 1.6.0 compatibility
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论