From 00b9e0a91bae6bb726d56ea1a98b27033e3211e8 Mon Sep 17 00:00:00 2001 From: TeslaZhao Date: Sun, 17 Jan 2021 22:46:39 +0800 Subject: [PATCH] update PrecisionType.Float32 import path --- python/paddle_serving_app/local_predict.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/paddle_serving_app/local_predict.py b/python/paddle_serving_app/local_predict.py index 2a2fcabe..b6b4ee4e 100644 --- a/python/paddle_serving_app/local_predict.py +++ b/python/paddle_serving_app/local_predict.py @@ -20,6 +20,7 @@ import google.protobuf.text_format import numpy as np import argparse import paddle.fluid as fluid +import paddle.inference as inference from .proto import general_model_config_pb2 as m_config from paddle.fluid.core import PaddleTensor from paddle.fluid.core import AnalysisConfig @@ -125,11 +126,10 @@ class LocalPredictor(object): if use_lite: config.enable_lite_engine( - precision_mode = PrecisionType.Float32, - zero_copy = True, - passes_filter = [], - ops_filter = [] - ) + precision_mode=inference.PrecisionType.Float32, + zero_copy=True, + passes_filter=[], + ops_filter=[]) if use_xpu: config.enable_xpu(100 * 1024 * 1024) -- GitLab