Unverified Commit 3ec4b949 authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Fix regression on Detection training script (#5985)

parent fd935fe9
...@@ -158,10 +158,7 @@ def main(args): ...@@ -158,10 +158,7 @@ def main(args):
device = torch.device(args.device) device = torch.device(args.device)
if args.use_deterministic_algorithms: if args.use_deterministic_algorithms:
torch.backends.cudnn.benchmark = False
torch.use_deterministic_algorithms(True) torch.use_deterministic_algorithms(True)
else:
torch.backends.cudnn.benchmark = True
# Data loading code # Data loading code
print("Loading data") print("Loading data")
...@@ -253,8 +250,6 @@ def main(args): ...@@ -253,8 +250,6 @@ def main(args):
scaler.load_state_dict(checkpoint["scaler"]) scaler.load_state_dict(checkpoint["scaler"])
if args.test_only: if args.test_only:
# We disable the cudnn benchmarking because it can noticeably affect the accuracy
torch.backends.cudnn.benchmark = False
torch.backends.cudnn.deterministic = True torch.backends.cudnn.deterministic = True
evaluate(model, data_loader_test, device=device) evaluate(model, data_loader_test, device=device)
return return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment