From 6e1cfb0525f45acb85607d455a0da1aa6e0f0d03 Mon Sep 17 00:00:00 2001 From: MissPenguin Date: Tue, 22 Jun 2021 08:39:03 +0000 Subject: [PATCH] fix cpu infer error for table structure --- tools/infer/utility.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index d491d601..1d652e7d 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -331,10 +331,11 @@ def create_predictor(args, mode, logger): config.disable_glog_info() config.delete_pass("conv_transpose_eltwiseadd_bn_fuse_pass") + if mode == 'structure': + config.delete_pass("fc_fuse_pass") # not supported for table config.switch_use_feed_fetch_ops(False) config.switch_ir_optim(True) - if mode == 'structure': - config.switch_ir_optim(False) + # create predictor predictor = inference.create_predictor(config) input_names = predictor.get_input_names() -- GitLab