Configuration Info

Common Environment Variables

HB_NN_LOG_LEVEL // Set the log level of DNN module. The values 0, 1, 2, 3, 4, 5, and 6 correspond to Trace, Debug, Info, Warn, Error, Critical, and Never, respectively. The default level is Warn. HB_NN_CUSTOM_LIB_PATH // Set custom operator library for the DNN module

Log Level Setting Instruction

  • Log level:

The logs in dnn are mainly divided into 7 levels:

The log level can be set to 0, 1, 2, 3, 4, 5 and 6, corresponding to Trace, Debug, Info, Warn, Error, Critical and Never, with the default being Warn.

  • Log level setting rules:

    • If the occurring LOG level is greater than or equal to the set level, then the LOG can be printed, otherwise, it will be shielded.
    • The smaller the set LOG level, the more information is printed. For example, if the LOG level is set to 3, which is the Warn level, then LOGs at levels 3, 4, 5 can all be printed. The default LOG level for the prediction library is the Warn level, so log messages at the Warn, Error, and Critical levels can be printed.

Custom operator library settings instructions

DNN supports model inference using custom operators. The settings are as follows:

export HB_NN_CUSTOM_LIB_PATH=/userdata/custom_lib/liba.so:/userdata/custom_lib/libb.so:/userdata/custom_lib/libc.so
Note
  • Multiple operator libraries are separated by colons.

  • If the same operator exists in different operator libraries, the operator in the earlier operator library will be used first.

  • If the custom operator library does not exist, a warning message will be printed and the loading of the operator library will be skipped.