Unverified 提交 91af0401 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

PyTorch 1.6.0 compatibility updates

上级 7f8471ea
......@@ -148,6 +148,7 @@ class Model(nn.Module):
print('Fusing layers... ', end='')
for m in self.model.modules():
if type(m) is Conv:
m._non_persistent_buffers_set = set() # pytorch 1.6.0 compatability
m.conv = torch_utils.fuse_conv_and_bn(m.conv, m.bn) # update conv
m.bn = None # remove batchnorm
m.forward = m.fuseforward # update forward
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论