The hb_model_info Tool

The hb_model_info tool is used to parse the dependencies and parameters of the *.hbm, the *.bc in compilation and the basic information of the *.onnx model, at the same time support the checking of *.bc deletable nodes.

How to Use

hb_model_info ${model_file}

Parameters

PARAMETERDESCRIPTION
-h, --helpDisplays help information and exits.
--versionDisplays version information and exits.
-n, --nameFollowed by the model name. Specify the desired model when HGM_FILE is a pack model for dumping model compilation information for this specified model.
-v, --visualizeStart netron server to view the model structure, you can close it with Ctrl+C when you finish viewing.

Output Contents

The outputs will be part of the inputs when the model is compiled, as follows:

Note

The version number information and other content in the following code block will change with the release package version, and here is only as an example.

log will be stored in /open_explorer/hb_model_info.log Start hb_model_info.... hb_model_info version 3.0.8 hbm_path: /open_explorer/mobilenetv1_224x224_nv12.hbm desc file path: mobilenetv1_224x224_nv12_desc.json ************* mobilenetv1_224x224_nv12 ************* ############# model deps info ############# builder version : 3.0.8 hbdk version : 4.0.17 horizon nn version : 1.0.3 ############# model_parameters info ############# caffe_model : /open_explorer/samples/ai_toolchain/horizon_model_convert_sample/01_common/model_zoo/mapper/classification/mobilenet/mobilenet.caffemodel prototxt : /open_explorer/samples/ai_toolchain/horizon_model_convert_sample/01_common/model_zoo/mapper/classification/mobilenet/mobilenet_deploy.prototxt BPU march : nash-e layer_out_dump : False working dir : /open_explorer/samples/ai_toolchain/horizon_model_convert_sample/03_classification/01_mobilenetv1/model_output output_model_file_prefix: mobilenetv1_224x224_nv12 node_info : {} ############# input_parameters info ############# ------------------------------------------ ---------input info : data --------- input_name : data input_type_rt : nv12 input_space&range : regular input_type_train : bgr input_layout_train : NCHW norm_type : data_mean_and_scale input_shape : 1x3x224x224 mean_value : [103.94, 116.78, 123.68] scale_value : [0.017] separate_batch : False ---------input info : data end ------- ------------------------------------------ ############# calibration_parameters info ############# calibration_type : max cal_data_dir : /open_explorer/samples/ai_toolchain/horizon_model_convert_sample/03_classification/01_mobilenetv1/calibration_data_bgr max_percentile : 0.9999 per_channel : False ############# compiler_parameters info ############# debug : True optimize_level : O2 compile_mode : latency core_num : 1 balance_factor : 100 input_source : {'data': 'pyramid'} hbm_path: /open_explorer/mobilenetv1_224x224_nv12.hbm ############# Model input/output info ############# NAME TYPE SHAPE DATA_TYPE ---- ------ ---------------- --------- data input [1, 224, 224, 3] uint8 prob output (1, 1000, 1, 1) float32