python预测部署报错
Created by: ljx111
以下是报错信息,环境配置应该都没问题
----------- Running Arguments -----------
image_file: D:/data/test_img/1-167.jpg
model_dir: inference_model/cascade_rcnn_r101
output_dir: D:/data/test_vis
run_benchmark: False
run_mode: fluid
threshold: 0.5
use_gpu: True
video_file:
------------------------------------------
----------- Model Configuration -----------
Model Arch: RCNN+FPN
Use Padddle Executor: False
Transform Order:
--transform op: Resize
--transform op: Normalize
--transform op: Permute
--------------------------------------------
Traceback (most recent call last):
File "deploy/python/infer.py", line 634, in <module>
predict_image()
File "deploy/python/infer.py", line 545, in predict_image
results = detector.predict(FLAGS.image_file, FLAGS.threshold)
File "deploy/python/infer.py", line 516, in predict
self.predictor.zero_copy_run()
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 "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2525, in append_op
attrs=kwargs.get("attrs", None))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/nn.py", line 12640, in py_func
'backward_skip_vars': list(backward_skip_vars)
File "/home/aistudio/work/PaddleDetection/ppdet/modeling/ops.py", line 373, in __call__
func=_soft_nms, x=[bboxes, scores], out=pred_result)
File "/home/aistudio/work/PaddleDetection/ppdet/modeling/roi_heads/cascade_head.py", line 250, in get_prediction_cls_aware
pred_result = self.nms(bboxes=box_out, scores=sum_cascade_cls_prob)
File "/home/aistudio/work/PaddleDetection/ppdet/modeling/architectures/cascade_rcnn_cls_aware.py", line 170, in build
self.cascade_decoded_box, self.cascade_bbox_reg_weights)
File "/home/aistudio/work/PaddleDetection/ppdet/modeling/architectures/cascade_rcnn_cls_aware.py", line 217, in test
return self.build(feed_vars, 'test')
File "tools/export_model.py", line 97, in main
test_fetches = model.test(feed_vars)
File "tools/export_model.py", line 114, in <module>
main()
----------------------
Error Message Summary:
----------------------
InvalidArgumentError: Invalid python callable id 0, which should be less than 0.
[Hint: Expected i < g_py_callables.size(), but received i:0 >= g_py_callables.size():0.] at (D:\1.8.1\paddle\paddle\fluid\operators\py_func_op.cc:49)
[operator < py_func > error]