python预测部署出现问题
Created by: qczhang123
训练结束后搭建python的预测时使用如下命令: python deploy/python/infer.py --conf=F:/project/PaddleSeg-release-v0.4.0/freeze_model/deploy.yaml --input_dir=F:/data/TestData/images/test --use_pr=False 报如下错: Traceback (most recent call last): File "deploy/python/infer.py", line 318, in # run inference File "deploy/python/infer.py", line 300, in run # 3. do a inference on images File "deploy/python/infer.py", line 271, in predict infer_start = time.time() paddle.fluid.core_avx.EnforceNotMet:
C++ Call Stacks (More useful to developers):
Windows not support stack backtrace yet.
Python Call Stacks (More useful to users):
File "E:\anaconda3\lib\site-packages\paddle\fluid\framework.py", line 2525, in append_op attrs=kwargs.get("attrs", None)) File "E:\anaconda3\lib\site-packages\paddle\fluid\layers\math_op_patch.py", line 243, in impl attrs={'axis': axis}) File "F:\project\PaddleSeg-release-v0.4.0\pdseg\models\model_builder.py", line 152, in export_preprocess image = (image / 255 - mean) / std File "F:\project\PaddleSeg-release-v0.4.0\pdseg\models\model_builder.py", line 184, in build_model origin_image) File "pdseg/export_model.py", line 88, in export_inference_model infer_prog, startup_prog, phase=ModelPhase.PREDICT) File "pdseg/export_model.py", line 126, in main export_inference_model(args) File "pdseg/export_model.py", line 130, in main()
Error Message Summary:
Error: ShapeError: broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1, 512, 512, 512] and the shape of Y = [1, 3, 1, 1]. Received [512] in X is not equal to [3] in Y at (D:\1.7.2\paddle\paddle/fluid/operators/elementwise/elementwise_op_function.h:145) [operator < elementwise_sub > error]
报错说shape不匹配怎么回事啊,调整调啊,望大神给与解答!