From ff7ee7f1f133b7be04e72d84f30a505c24f8bf3e Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 30 Jan 2020 12:12:04 -0800 Subject: [PATCH] updates --- detect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/detect.py b/detect.py index 2d826a49..d14ca47f 100644 --- a/detect.py +++ b/detect.py @@ -36,14 +36,16 @@ def detect(save_img=False): # Fuse Conv2d + BatchNorm2d layers # model.fuse() + # torch_utils.model_info(model, report='summary') # 'full' or 'summary' # Eval mode model.to(device).eval() # Export mode if ONNX_EXPORT: + model.fuse() img = torch.zeros((1, 3) + img_size) # (1, 3, 320, 192) - torch.onnx.export(model, img, 'weights/export.onnx', verbose=False, opset_version=10) + torch.onnx.export(model, img, 'weights/export.onnx', verbose=False, opset_version=11) # Validate exported model import onnx