From 7921351b4e4030a2db9e1488f8ef5a166abff17d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 30 Jul 2022 21:25:16 +0200 Subject: [PATCH] Deprecate torch 1.6.0 `compat _non_persistent_buffers_set` (#8797) Deprecate torch 1.6.0 compat _non_persistent_buffers_set --- models/experimental.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/models/experimental.py b/models/experimental.py index db8e5b8e1..0317c7526 100644 --- a/models/experimental.py +++ b/models/experimental.py @@ -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