This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSPM0G5187:用于字符识别的输入格式

Guru**** 2874030 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1627895/mspm0g5187-input-format-for-char-recognition

器件型号: MSPM0G5187

您好、

tvmgen_default.h 从 LENET5 开始、输入格式如下。

/*输入功能归一化参数:

 * input_int = clip ((int32_t)((INPUT_float + bias)* scale))>> shift、min、max)

 * 其中 (min、max)=(–128,127) 如果是 int8 类型、则为 (0255) 如果是 uint8 类型

 */

#define TVMGEN_DEFAULT_BIAS_LEN 1.

#define TVMGEN_DEFAULT_SCALE_LEN 1.

#define TVMGEN_DEFAULT_SHIFT_LEN 1.

extern const float tvmgen_default_bias_data[]__attribute__((weak))={–0.710783};

extern const int32_t tvmgen_default_scale_data[]__attribute__((weak))={229};

extern const int32_t tvmgen_default_shift_data[]__attribute__((weak))={2};

 

因此、输入数据格式为浮点。

通常、来自图像传感器的数据为 8 位 (0-255)。 进行转换需要时间。 如果没有如 tvmgen_default.h 中所述转换格式、会发生什么情况?

或者如何以 8 位格式输入图像?

 

BR、

Frank

 

 

 

 

 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Frank、

    让我与我们的内部团队核实、收到回复后、我将返回回复您

    此致、

    Janz Bai

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Janz:

    是否有任何更新?

    BR、

    Frank

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Frank、

    我正在等待负责 AI 功能响应的内部团队。 当我得到回应时,我会尽快回复你。

    BR、

    Janz Bai

    Janz、

    Akshat,  

    是的,这个例子适用于浮点,我们保留它的原因,而不是 INT8 是显示 BYOM 工作流程
    在这个示例中、Lenet5 是一个需要浮动作为输入的预训练模型、可以卸载到 NPU。

     

    我们可以找到支持这两个流程的方法。
    是、这可以通过 NNC 的“skip_normalize=true"标志“标志进行管理、但也可以进行模型重新训练
    当数据范围在 float 和 int8 之间变化时

    BR、

    Frank