Skip to content

Commit

Permalink
Merge pull request deepcam-cn#157 from ilgrad/master
Browse files Browse the repository at this point in the history
torch 1.11.0 compatibility, Upsample
  • Loading branch information
derronqi authored Apr 8, 2022
2 parents 89b0175 + dd1f7d5 commit f5dda40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def fuse(self): # fuse model Conv2d() + BatchNorm2d() layers
m.conv = fuse_conv_and_bn(m.conv, m.bn) # update conv
delattr(m, 'bn') # remove batchnorm
m.forward = m.fuseforward # update forward
elif type(m) is nn.Upsample:
m.recompute_scale_factor = None # torch 1.11.0 compatibility
self.info()
return self

Expand Down

0 comments on commit f5dda40

Please sign in to comment.