config_fasternet.prototxt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # 基本配置参数:输入输出
  2. input_type: INPUT_TYPE_ONNX
  3. output_type: OUTPUT_TYPE_JOINT
  4. # 硬件平台选择
  5. target_hardware: TARGET_HARDWARE_AX620
  6. # CPU 后端选择,默认采用 AXE
  7. cpu_backend_settings {
  8. onnx_setting {
  9. mode: DISABLED
  10. }
  11. axe_setting {
  12. mode: ENABLED
  13. axe_param {
  14. optimize_slim_model: true
  15. }
  16. }
  17. }
  18. # 模型输入数据类型设置
  19. src_input_tensors {
  20. color_space: TENSOR_COLOR_SPACE_RGB
  21. }
  22. dst_input_tensors {
  23. color_space: TENSOR_COLOR_SPACE_RGB
  24. }
  25. # neuwizard 工具的配置参数
  26. neuwizard_conf {
  27. operator_conf {
  28. input_conf_items {
  29. attributes {
  30. input_modifications {
  31. affine_preprocess {
  32. slope: 1
  33. slope_divisor: 256
  34. bias: -0.5
  35. }
  36. }
  37. # input_modifications {
  38. # input_normalization {
  39. # mean: [0.485,0.456,0.406] ## 均值
  40. # std: [0.229,0.224,0.255] ## 方差
  41. # }
  42. # }
  43. }
  44. }
  45. }
  46. dataset_conf_calibration {
  47. path: "/root/axera/axera-quan-hjj/dataset/handpose.tar" # 设置 PTQ 校准数据集路径
  48. type: DATASET_TYPE_TAR # 数据集类型:tar 包
  49. size: 100 # 量化校准过程中实际使用的图片张数
  50. batch_size: 1
  51. }
  52. dataset_conf_error_measurement {
  53. path: "/root/axera/axera-quan-hjj/dataset/handpose.tar" # 用于编译过程中对分
  54. type: DATASET_TYPE_TAR
  55. size: 100 # 对分过程所需实际数据个数为 4
  56. batch_size: 16
  57. }
  58. evaluation_conf {
  59. path: "neuwizard.evaluator.error_measure_evaluator"
  60. type: EVALUATION_TYPE_ERROR_MEASURE
  61. source_ir_types: IR_TYPE_ONNX
  62. ir_types: IR_TYPE_LAVA
  63. score_compare_per_layer: true
  64. }
  65. }
  66. # 输出 layout 设置, 建议使用 NHWC, 速度更快
  67. dst_output_tensors {
  68. tensor_layout:NHWC
  69. }
  70. # pulsar compiler 的配置参数
  71. pulsar_conf {
  72. ax620_virtual_npu: AX620_VIRTUAL_NPU_MODE_111 # 业务场景需要使用 ISP, 则必须使用 vNPU 111 配置, 1.8Tops 算力给用户的算法模型
  73. batch_size: 1
  74. debug : false
  75. }