Skip to content

Commit

Permalink
Deprecate torch 1.6.0 compat _non_persistent_buffers_set (#8797)
Browse files Browse the repository at this point in the history
Deprecate torch 1.6.0 compat _non_persistent_buffers_set
  • Loading branch information
glenn-jocher committed Jul 30, 2022
1 parent ec4de43 commit 7921351
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions models/experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ def attempt_load(weights, device=None, inplace=True, fuse=True):
if t is Detect and not isinstance(m.anchor_grid, list):
delattr(m, 'anchor_grid')
setattr(m, 'anchor_grid', [torch.zeros(1)] * m.nl)
elif t is Conv:
m._non_persistent_buffers_set = set() # torch 1.6.0 compatibility
elif t is nn.Upsample and not hasattr(m, 'recompute_scale_factor'):
m.recompute_scale_factor = None # torch 1.11.0 compatibility

Expand Down

0 comments on commit 7921351

Please sign in to comment.