#查看模型信息
使用 hrt_model_exec model_info 工具可用于获取模型信息。
#支持范围
模型支持范围:qat模型,ptq模型。
#使用方法
Usage:
hrt_model_exec [Option...] [Parameter]
[Option] [instruction]
---------------------------------------------------------------------------------------------------------------
-h --help Display this information
-v --version Display this version
[Option] [Parameter]
---------------------------------------------------------------------------------------------------------------
--model_file [string]: Model file paths, separate by comma, each represents one model file path.
--model_name [string]: Model name.
When model_file has one more model and Subcommand is infer or perf,
"model_name" must be specified!
[Examples]
--------------------------------------------------------------------------------------------------------------------
hrt_model_exec model_info
--model_file
--model_name
#参数说明
| 参数 | 参数说明 | 关联参数 | |
|---|---|---|---|
-h, --help | 无。 | 显示帮助信息。 | 无。 |
-v, --version | 无。 | 查看工具的 dnn 预测库版本号。 | 无。 |
model_info | 无。 | 该参数用于获取模型信息,如:模型的输入输出信息等。 | 该参数与model_file一起使用,用于获取模型的详细信息,信息包括模型输入输出信息hbDNNTensorProperties。 |
model_file | string | 模型文件路径,多个路径可通过逗号分隔。 | 无。 |
model_name | string | 指定某个模型的名称。 | 无。 |
#使用示例
#获取单模型信息
hrt_model_exec model_info --model_file=xxx.hbm
../aarch64/bin/hrt_model_exec model_info --model_file=resnet50_224x224_nv12.hbm
Load model to DDR cost 1965.57ms.
This model file has 1 model:
[resnet50_224x224_nv12]
---------------------------------------------------------------------
[model name]: resnet50_224x224_nv12
input[0]:
name: input_y
valid shape: (1,224,224,1,)
aligned byte size: -1
tensor type: HB_DNN_TENSOR_TYPE_U8
quanti type: NONE
stride: (-1,-1,1,1,)
input[1]:
name: input_uv
valid shape: (1,112,112,2,)
aligned byte size: -1
tensor type: HB_DNN_TENSOR_TYPE_U8
quanti type: NONE
stride: (-1,-1,2,1,)
output[0]:
name: output
valid shape: (1,1000,)
aligned byte size: 4096
tensor type: HB_DNN_TENSOR_TYPE_F32
quanti type: NONE
stride: (4000,4,)
---------------------------------------------------------------------#获取多模型信息
- 输出所有模型信息。
hrt_model_exec model_info --model_file=xxx.hbm,xxx.hbm - 输出指定pack模型信息。
hrt_model_exec model_info --model_file=xxx.hbm --model_name=xx