From cacf8f8a6ca42c7fe4e91a898225839f3be0b5e1 Mon Sep 17 00:00:00 2001 From: Channingss Date: Tue, 26 Jan 2021 11:44:52 +0000 Subject: [PATCH] export_model support dynamic input shape --- tools/export_model.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/export_model.py b/tools/export_model.py index 74357d58..b7d61a59 100755 --- a/tools/export_model.py +++ b/tools/export_model.py @@ -51,8 +51,11 @@ def main(): model.eval() save_path = '{}/inference'.format(config['Global']['save_inference_dir']) - infer_shape = [3, 32, 100] if config['Architecture'][ - 'model_type'] != "det" else [3, 640, 640] + + infer_shape = [3, -1, -1] + if config['Architecture']['model_type'] == "rec": + infer_shape = [3, 32, -1] + model = to_static( model, input_spec=[