faster_rcnn_r50_1x 训练完成,模型已导出,但在预测时报错。
Created by: wyc880622
模型导出应该没有问题。 报错内容如下所示:请问大师该如何解决?
(paddle) G:\Halcon\Paddle\PaddleDetection>python -u tools/infer.py -c configs/faster_rcnn_r50_1x.yml -o weights=inference_model\faster_rcnn_r50_1x --infer_img=demo/1.jpg --output_dir=infer_output W0423 19:38:42.788797 21428 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 61, Driver API Version: 10.1, Runtime API Version: 10.0 W0423 19:38:42.800806 21428 device_context.cc:245] device: 0, cuDNN Version: 7.6. 2020-04-23 19:38:44,095-INFO: Loading parameters from inference_model\faster_rcnn_r50_1x... 2020-04-23 19:38:44,095-WARNING: inference_model\faster_rcnn_r50_1x.pdparams not found, try to load model file saved with [ save_params, save_persistables, save_vars ] 2020-04-23 19:38:44,095-WARNING: inference_model\faster_rcnn_r50_1x.pdparams not found, try to load model file saved with [ save_params, save_persistables, save_vars ] 2020-04-23 19:38:44,098-WARNING: variable file [ inference_model/faster_rcnn_r50_1x/params inference_model/faster_rcnn_r50_1x/model ] not used 2020-04-23 19:38:44,098-WARNING: variable file [ inference_model/faster_rcnn_r50_1x/params inference_model/faster_rcnn_r50_1x/model ] not used C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py:804: UserWarning: There are no operators in the program to be executed. If you pass Program manually, please use fluid.program_guard to ensure the current Program is being used. warnings.warn(error_info) 2020-04-23 19:38:44,100-INFO: Load categories from G:/Halcon/Paddle/PaddleDetection/dataset/coco/annotations/instance_test.json loading annotations into memory... Done (t=0.00s) creating index... index created! C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py:782: UserWarning: The following exception is not an EOF exception. "The following exception is not an EOF exception.") Traceback (most recent call last): File "tools/infer.py", line 271, in main() File "tools/infer.py", line 185, in main return_numpy=False) File "C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 783, in run six.reraise(*sys.exc_info()) File "C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\six.py", line 703, in reraise raise value File "C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 778, in run use_program_cache=use_program_cache) File "C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 831, in _run_impl use_program_cache=use_program_cache) File "C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 902, in _run_program self._feed_data(program, feed, feed_var_name, scope) File "C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 580, in _feed_data check_feed_shape_type(var, cur_feed) File "C:\Users\Administrator\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 230, in check_feed_shape_type (var.name, len(var.shape), var.shape, feed_shape)) ValueError: The fed Variable 'image' should have dimensions = 4, shape = (-1, 3, 800, 1333), but received fed shape [1, 3, 800, 1067] on each device