详细描述问题:
目前配置方式
/open_explorer/horizon_model_convert_sample/03_classification/05_efficientnet_lite0_onnx/mapper/efficientnet_lite0_config.yaml中修改配置如下
- input_shape: '4x3x224x224'
- input_batch: 4
按如上配置不同batch时,实际模型转换有错误
具体log如下
root@52ad98697b08:/open_explorer/horizon_model_convert_sample/03_classification/05_efficientnet_lite0_onnx/mapper# ./03_build.sh
cd $(dirname $0) || exit
config_file="./efficientnet_lite0_config.yaml"
model_type="onnx"
# build model
hb_mapper makertbin --config ${config_file} --model-type ${model_type}
2023-04-27 14:59:26,313 INFO log will be stored in /open_explorer/horizon_model_convert_sample/03_classification/05_efficientnet_lite0_onnx/mapper/hb_mapper_makertbin.log
2023-04-27 14:59:26,313 INFO Start hb_mapper....
2023-04-27 14:59:26,313 INFO hbdk version 3.44.1
2023-04-27 14:59:26,313 INFO horizon_nn version 0.16.3
2023-04-27 14:59:26,313 INFO hb_mapper version 1.15.5
2023-04-27 14:59:26,313 INFO Start Model Convert....
2023-04-27 14:59:26,322 INFO Using onnx model file: /open_explorer/horizon_model_convert_sample/zqs_models/efficientnet_lite0/efficientnet_lite0.onnx
2023-04-27 14:59:26,332 INFO Model has 1 inputs according to model file
2023-04-27 14:59:26,332 INFO Model name not given in yaml_file, using model name from model file: ['images']
2023-04-27 14:59:26,332 WARNING For input 0: user input shape: [4, 3, 224, 224] is different from model file input shape: [0, 3, 224, 224]. Using user input info
2023-04-27 14:59:26,332 ERROR Parse 'input_parameters' failed!
2023-04-27 14:59:26,333 ERROR yaml file parse failed. Please double check your config file inputs
2023-04-27 14:59:26,333 ERROR 'input_batch' option in 'input_parameters' is configured. This option only works when model has single input and the first dimensional of its input must be 1. Current model has 1 input, with input_shape: [[4, 3, 224, 224]]

