From 968b2ec004fce0957f4c034b7ac94325261e80a8 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 5 Apr 2020 14:05:12 -0700 Subject: [PATCH] .fuse() after .eval() --- detect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/detect.py b/detect.py index 7be56115..f2501970 100644 --- a/detect.py +++ b/detect.py @@ -34,12 +34,12 @@ def detect(save_img=False): modelc.load_state_dict(torch.load('weights/resnet101.pt', map_location=device)['model']) # load weights modelc.to(device).eval() - # Fuse Conv2d + BatchNorm2d layers - # model.fuse() - # Eval mode model.to(device).eval() + # Fuse Conv2d + BatchNorm2d layers + # model.fuse() + # Export mode if ONNX_EXPORT: model.fuse()