模型导出后,预测报错 无法加载参数模型
Created by: GodMmmm
(paddle) C:\Users\11480\PYwork\paddlepaddle-PaddleDetection-master\PaddleDetection>python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml -o weights=C:/Users/11480/PYwork/paddlepaddle-PaddleDetection-master/PaddleDetection/inference_model/yolov3_mobilenet_v1_fruit/ --infer_img=demo/1.jpg --output_dir=C:/Users/11480/PYwork/paddlepaddle-PaddleDetection-master/PaddleDetection/infer_output ######################### cmd输出########################### W0421 13:55:01.452873 7348 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 61, Driver API Version: 9.2, Runtime API Version: 9.0 W0421 13:55:01.458808 7348 device_context.cc:245] device: 0, cuDNN Version: 7.3. 2020-04-21 13:55:02,276-INFO: Loading parameters from C:/Users/11480/PYwork/paddlepaddle-PaddleDetection-master/PaddleDetection/inference_model/yolov3_mobilenet_v1_fruit/... 2020-04-21 13:55:02,276-WARNING: C:/Users/11480/PYwork/paddlepaddle-PaddleDetection-master/PaddleDetection/inference_model/yolov3_mobilenet_v1_fruit/.pdparams not found, try to load model file saved with [ save_params, save_persistables, save_vars ] 2020-04-21 13:55:02,276-WARNING: C:/Users/11480/PYwork/paddlepaddle-PaddleDetection-master/PaddleDetection/inference_model/yolov3_mobilenet_v1_fruit/.pdparams not found, try to load model file saved with [ save_params, save_persistables, save_vars ] C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py:789: UserWarning: The following exception is not an EOF exception. "The following exception is not an EOF exception.") Traceback (most recent call last): File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\io.py", line 1865, in load_program_state filename=file_name) File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\io.py", line 793, in load_vars executor.run(load_prog) File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 790, in run six.reraise(*sys.exc_info()) File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\six.py", line 703, in reraise raise value File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 785, in run use_program_cache=use_program_cache) File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 838, in _run_impl use_program_cache=use_program_cache) File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\executor.py", line 912, in _run_program fetch_var_name) 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 "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\framework.py", line 2525, in append_op attrs=kwargs.get("attrs", None)) File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\io.py", line 773, in load_vars attrs={'file_path': os.path.join(dirname, new_var.name)}) File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\io.py", line 1865, in load_program_state filename=file_name) File "C:\Users\11480\PYwork\paddlepaddle-PaddleDetection-master\PaddleDetection\ppdet\utils\checkpoint.py", line 91, in _load_state state = fluid.io.load_program_state(path) File "C:\Users\11480\PYwork\paddlepaddle-PaddleDetection-master\PaddleDetection\ppdet\utils\checkpoint.py", line 125, in load_params state = _load_state(path) File "tools/infer.py", line 139, in main checkpoint.load_params(exe, infer_prog, cfg.weights) File "tools/infer.py", line 272, in main()
Error Message Summary:
InvalidArgumentError: tensor version 1600484213 is not supported, Only version 0 is supported [Hint: Expected version == 0U, but received version:1600484213 != 0U:0.] at (D:\1.7.2\paddle\paddle\fluid\framework\lod_tensor.cc:287) [operator < load > error]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "tools/infer.py", line 272, in main() File "tools/infer.py", line 139, in main checkpoint.load_params(exe, infer_prog, cfg.weights) File "C:\Users\11480\PYwork\paddlepaddle-PaddleDetection-master\PaddleDetection\ppdet\utils\checkpoint.py", line 125, in load_params state = _load_state(path) File "C:\Users\11480\PYwork\paddlepaddle-PaddleDetection-master\PaddleDetection\ppdet\utils\checkpoint.py", line 91, in _load_state state = fluid.io.load_program_state(path) File "C:\Users\11480\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\io.py", line 1868, in load_program_state "Failed to load model file , please make sure model file is saved with the " RuntimeError: Failed to load model file , please make sure model file is saved with the following APIs: save_params, save_persistables, save_vars
在weights=C:/Users/11480/PYwork/paddlepaddle-PaddleDetection-master/PaddleDetection/inference_model/yolov3_mobilenet_v1_fruit/ 后加不加/都试了