Skip to content

Commit f1d007d

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Fix regression on Detection training script (#5985)
Reviewed By: datumbox Differential Revision: D36413361 fbshipit-source-id: 8e61cae70c97255ebc143991eaad5a07633d317c
1 parent 9181496 commit f1d007d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

references/detection/train.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@ def main(args):
158158
device = torch.device(args.device)
159159

160160
if args.use_deterministic_algorithms:
161-
torch.backends.cudnn.benchmark = False
162161
torch.use_deterministic_algorithms(True)
163-
else:
164-
torch.backends.cudnn.benchmark = True
165162

166163
# Data loading code
167164
print("Loading data")
@@ -253,8 +250,6 @@ def main(args):
253250
scaler.load_state_dict(checkpoint["scaler"])
254251

255252
if args.test_only:
256-
# We disable the cudnn benchmarking because it can noticeably affect the accuracy
257-
torch.backends.cudnn.benchmark = False
258253
torch.backends.cudnn.deterministic = True
259254
evaluate(model, data_loader_test, device=device)
260255
return

0 commit comments

Comments
 (0)