PyTorch 1.6.0 compatibility updates
This commit is contained in:
1 parent
7f8471eaeb
commit
91af0401d8
1 file changed
+1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user