diff --git a/tools/export_model.py b/tools/export_model.py index 0bd06b98dcacc06893becbefacbea198c432bc39..7630a77edccc582b07e01f7e585399c65bfc046c 100644 --- a/tools/export_model.py +++ b/tools/export_model.py @@ -15,6 +15,7 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function +from ppocr.utils.utility import enable_static_mode import os import sys @@ -43,7 +44,6 @@ logger = initial_logger() from ppocr.utils.save_load import init_model - def main(): startup_prog, eval_program, place, config, _ = program.preprocess() @@ -72,4 +72,5 @@ def main(): if __name__ == '__main__': + enable_static_mode() main()