PaddleX导出推理模型缺少包
Created by: Sharpiless
在导出PaddleX的PPYOLO为推理模型时报错:
!paddlex --export_inference --model_dir=./ppyolo_model/best_model --save_dir=./det_inference_model --fixed_input_shape=[608,608]
[09-16 09:46:35 MainThread @logger.py:224] Argv: /opt/conda/envs/python35-paddle120-env/bin/paddlex --export_inference --model_dir=./ppyolo_model/best_model --save_dir=./det_inference_model --fixed_input_shape=[608,608] Traceback (most recent call last): File "/opt/conda/envs/python35-paddle120-env/bin/paddlex", line 10, in sys.exit(main()) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/command.py", line 156, in main model = pdx.load_model(args.model_dir, fixed_input_shape) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/models/load_model.py", line 66, in load_model mode='test') File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/models/ppyolo.py", line 171, in build_net model_out = model.build_net(inputs) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/detection/yolo_v3.py", line 505, in build_net head_outputs = self._head(feats, self.mode == 'train') File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/detection/yolo_v3.py", line 144, in _head name=self.prefix_name + "yolo_block.{}".format(i)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/detection/yolo_v3.py", line 331, in _detection_block conv = self._add_coord(conv, is_test=is_test) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/nets/detection/yolo_v3.py", line 220, in _add_coord idx_i = np.array( NameError: name 'np' is not defined
是否是该文件么有import numpy?