Quantitative perception training terminal chip model system

By introducing parameter S and using sign and scaling transformation activation functions in the image dark light enhancement process, the traditional normalization process is replaced, the problems of high hardware cost and insufficient training stability in the existing technology are solved, and the volume volume is significantly improved. product accuracy.

CN118799238APending Publication Date: 2024-10-18SHENZHEN MINGQI PURPLE CORE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410780587.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing technology requires a large amount of hardware to cooperate with the normalization process during the dark light enhancement process of the image, leading to problems such as increased system cost and insufficient training stability.

Method used

Introduce the parameter S, and use the sign transformation activation function and the scaling transformation activation function in the supervised learning model to learn and train the parameter S, instead of the traditional normalization processing method, adjust the sign and absolute value of the parameter S to maintain the transformation The vector is in a non-linear interval.

Benefits of technology

It effectively reduces the cost of hardware usage and improves the model convolution accuracy. Especially when FP8 quantization of deep network models, the convolution accuracy increases from 40% to 80.2%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799238A_ABST
    Figure CN118799238A_ABST
Patent Text Reader

Abstract

The invention provides a quantitative perception training terminal chip model system, which is characterized in that a parameter S is introduced into a transformation formula of a supervised learning model, so that a symbol transformation activation function is applied to enable the parameter S to carry out symbol learning during training of an overall model, and a scaling transformation activation function is applied to enable the parameter S to carry out scaling training; therefore, the parameter S is promoted to reach a proper value through training. The introduction of the parameter S effectively replaces the original necessary normalization processing mode in the prior art, so that the hardware use is greatly reduced, the cost is effectively reduced, and the model convolution precision can be greatly improved. When a deep network model is subjected to FP8 quantization, deployment is carried out at a chip end, and the convolution precision can be improved from about 40% to 80.2%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a quantization perception training terminal chip model system. Background Art

[0002] In the process of image dark light enhancement, it is often necessary to establish a supervised learning model to convert the dark light image into a normal color image. The training set of the initial supervised learning model is set to the initial vector data group X representing the dark light image, and the output corresponding to the initial vector data group X is the vector data group Y of the normal image. Then the convolution formula of the supervised learning model is Y=W*X+B, where W and B are the parameters that need to be learned in the supervised learning process.

[0003] In reality, the above convolution formula for convolutional neural network training often must be combined with normalization and other processing methods to improve training stability and alleviate the problem of gradient disappearance, thereby improving the robustness of the overall system.

[0004] However, this type of normalization processing often requires a lot of hardware coordination and requires the provision of additional components to achieve normalization, which results in additional overhead and greatly increases the cost of the overall system. Summary of the invention

[0005] The present invention provides a quantization perception training terminal chip model system, which effectively solves the above-mentioned problems existing in the prior art.

[0006] Specifically, the present invention provides a quantized perception training terminal chip model system, for example, applied to image dark light enhancement. For example, in the process of image dark light enhancement, a supervised learning model is established to convert the dark light image into a colored normal image, and the training set of the initial supervised learning model is set as the initial vector data X representing the dark light image, and the output corresponding to the initial vector data X is the conversion vector data Y of the normal image. The convolution formula of the supervised learning model is expressed as Y=W*X+B, wherein W and B are parameters set to be learned in the supervised learning process, the chip-side deployment parameter S of the supervised learning model, the transformation vector data Y1=S*Y, and a sign transformation activation function and a scaling transformation activation function are set in the supervised learning model. After the conversion vector data Y is input into the sign transformation activation function, it is output as the first output data Y'. When the conversion vector data Y is a positive number, Y' presents a first state, and when the conversion vector data Y is a negative number, Y' presents a second state, and the first state is different from the second state. state, replace the conversion vector data Y with the conversion vector data Y1 and input it into the sign transformation activation function. By observing the state of the first output data Y' output from the sign transformation activation function after the conversion vector data Y1 is input, based on the difference between the first state and the second state, adjust the positive and negative signs of the parameter S, and output the second output data Y" after the conversion vector data Y is input into the scaling transformation activation function. The second activation function has a nonlinear interval. Once the conversion vector data Y is outside the nonlinear interval, the second output data Y" will be at a constant value. Replace the conversion vector data Y with the conversion vector data Y1 and input it into the second activation function. By observing the numerical growth trend of the second output data Y" output from the second activation function after the conversion vector data Y1 is input, adjust the absolute value of the parameter S to ensure that the conversion vector data Y1 is always within the nonlinear interval. It should be noted that the above-mentioned dark light image enhancement is only an example, and the present invention can actually be applied to supervised learning other than dark light image enhancement.

[0007] Preferably, the sign transformation activation function is set to a ReLU function.

[0008] Preferably, when the conversion vector data Y is a positive number, the first output data Y' presents a first state of linearly rising and always being a positive value; when the conversion vector data Y is a negative number, the first output data Y' presents a second state of being uniformly zero.

[0009] Preferably, the parameter S is adjusted. If the conversion vector data Y is a positive number, the parameter S is selected to be positive, so that the transformation vector data Y1 is also a positive value. Using the transformation vector data Y1 as the independent variable of the Relu function, the output data of the Relu function will present a first state in which it increases linearly and is always positive.

[0010] Preferably, if the conversion vector data Y is a negative number, the parameter S is selected to be a negative sign, thereby, the transformation vector data Y1 is inverted to a positive value, and the transformation vector data Y1 is used as the independent variable of the Relu function. Then, the output data of the Relu function will present a first state in which it increases linearly and is always positive.

[0011] Preferably, the scaling transformation activation function is set to a sigmoid function.

[0012] Preferably, when the conversion vector data Y is input into the sigmoid function, the second output data Y'' is output, and its non-linear interval is [-5,5].

[0013] Preferably, once the value of the conversion vector data Y exceeds 5, the function output value of the sigmoid function is 1, and then, with the intervention of parameter S, the transformation vector data Y1 replaces the conversion vector data Y and is input into the scaling transformation activation function to compress the transformation vector data Y1 within the interval [-5,5].

[0014] In summary, the present invention provides a quantization perception training terminal chip model system. In the process of image dark light enhancement, the parameter S is introduced into the transformation formula of the supervised learning model, thereby applying the symbol transformation activation function to allow the parameter S to perform symbol learning during the training of the overall model, and applying the scaling transformation activation function to allow the parameter S to perform scaling training, thereby enabling the parameter S to reach a suitable value through training. The introduction of the parameter S effectively replaces the original necessary normalization processing method in the prior art, thereby greatly reducing the use of hardware, effectively reducing costs, and greatly improving the model convolution accuracy. When the deep network model is quantized to FP8, the convolution accuracy can be increased from about 40% to 80.2% when deployed on the chip side. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be discussed below. Obviously, the technical solutions described in conjunction with the drawings are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments and their drawings can be obtained based on the embodiments shown in these drawings without paying creative work.

[0016] Figure 1 A graph showing a Relu function as a sign-changing activation function in the present invention;

[0017] Figure 2 A graph showing a sigmoid function as a scaling transformation activation function in the present invention;

[0018] Figure 3A general operation flow chart of the quantization perception training terminal chip model system according to the present invention is shown. DETAILED DESCRIPTION

[0019] The technical solutions of various embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments described in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] The present invention provides a quantized perception training terminal chip model system, which is applied to, for example, image dark light enhancement. In the process of image dark light enhancement, a supervised learning model is established to convert the dark light image into a normal color image, and the training set of the initial supervised learning model is set as the initial vector data X representing the dark light image, and the output corresponding to the initial vector number X is the conversion vector data Y of the normal image. Then the convolution formula of the supervised learning model is Y=W*X+B, where W and B are the parameters that need to be learned in the supervised learning process. However, it should be noted that the present invention is not limited to the field of image dark light enhancement, and can actually be applied to other types of supervised learning.

[0021] In order to avoid using normalization processing in the corresponding convolutional neural network, the system provided by the present invention introduces a parameter S, so that the transformation vector data Y1 = S*Y. The parameter S is a learnable variable, which is deployed on the chip side. The parameter S can scale the range of the convolution result and change the positive and negative of the convolution result, so that the convolutional neural network model can be better learned.

[0022] In the convolutional neural network of this system, two activation functions are set to enable the overall convolutional neural network to learn better, especially for training the parameter S.

[0023] The first activation function is a sign-changing activation function. After the conversion vector data Y is input into the sign-changing activation function, the output is the first output data Y'. When the conversion vector data Y is a positive number, Y' presents a first state, and when the conversion vector data Y is a negative number, Y' presents a second state. The first state is different from the second state. Based on the difference between the first state and the second state, the sign of the parameter S is adjusted.

[0024] For example, the first activation function (i.e., the sign change activation function) can be set to a Relu function, such as Figure 1As shown. When the conversion vector data Y is a positive number (in the positive half axis of the figure), the first output data Y' presents a first state in which it rises linearly and is always positive; when the conversion vector data Y is a negative number (i.e., in the negative half axis of the figure), the first output data Y' presents a second state in which it is always 0. Obviously, as a Relu function of the activation function, the first output data Y' hopes to maintain in the first state, because the second state in which it is always 0 means that the signal data is annihilated.

[0025] In this case, the parameter S can be adjusted. If the conversion vector data Y is a positive number, the parameter S is selected to be positive. Thus, the transformation vector data Y1 is also a positive value. Using the transformation vector data Y1 as the independent variable of the Relu function, the output data of the Relu function will show a first state in which it increases linearly and is always positive.

[0026] On the contrary, if the conversion vector data Y is a negative number, the parameter S is selected to be a negative sign, thereby, the transformation vector data Y1 is reversed to a positive value. Using the transformation vector data Y1 as the independent variable of the Relu function, the output data of the Relu function will show a first state in which it increases linearly and is always positive.

[0027] Therefore, through the above-mentioned first activation function (ie, the sign change activation function), the parameter S can be learned, thereby ensuring that the output value of the first activation function is in a suitable state.

[0028] The first activation function mentioned above can train the sign of parameter S. In other words, in the convolutional neural network, parameter S plays a role in changing the positive or negative value of the result. Furthermore, the absolute value of parameter S itself can play a scaling function. In the following, the second activation function will be constructed to learn and train the scaling function of parameter S.

[0029] To this end, a second activation function is constructed in the convolutional neural network, which is a scaling transformation activation function. After the conversion vector data Y is input into the scaling transformation activation function, the second output data Y" is output. The second activation function has a nonlinear interval. Once the conversion vector data Y is outside the nonlinear interval, the second output data Y" will be at a nearly constant value. Here, the conversion vector data Y1 is input into the second activation function instead of the conversion vector data Y. By observing the numerical growth trend of the second output data Y" output from the second activation function after the conversion vector data Y1 is input, the absolute value of the parameter S can be adjusted to ensure that the conversion vector data Y1 is always within the nonlinear interval.

[0030] For example, the second activation function (i.e., the scaling transformation activation function) can be set to a sigmoid function, such as Figure 2 As shown. When the converted vector data Y is input into the sigmoid function and then the second output data Y' is output, then Figure 2 In the sigmoid function curve shown, it can be seen that the nonlinear area is roughly in the interval [-5,5]. Once the value of the conversion vector data Y exceeds 5, such as 100, 1000, 10000, the function output value is roughly 1, but 100, 1000, 10000 represent three different signals. At this time, the parameter S can play a role. By using the intervention of the parameter S, the transformation vector data Y1 is replaced by the conversion vector data Y and input into the second activation function, and the transformation vector data Y1 is compressed within the nonlinear interval [-5,5]. It can ensure that the second output data Y" is in the linear interval of the sigmoid function curve, so that the model training can proceed normally.

[0031] Figure 3 A general operation flow chart of the quantization perception training terminal chip model system according to the present invention is shown.

[0032] At this point, the quantization perception training terminal chip model system provided by the present invention has been roughly introduced. In summary, the present invention provides a quantization perception training terminal chip model system. In the process of dark light enhancement of the image, the parameter S is introduced into the transformation formula of the supervised learning model, thereby applying the sign transformation activation function to allow the parameter S to perform sign learning during the training of the overall model, and applying the scaling transformation activation function to allow the parameter S to perform scaling training, thereby enabling the parameter S to reach a suitable value through training. The introduction of the parameter S effectively replaces the original necessary normalization processing method in the prior art, thereby greatly reducing the use of hardware, effectively reducing costs, and greatly improving the model convolution accuracy. When the deep network model is quantized to FP8, the convolution accuracy can be increased from about 40% to 80.2% when deployed on the chip side.

[0033] The above description is only an exemplary embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A quantization perception training terminal chip model system, in which a supervised learning model is established and the training set of the initial supervised learning model is set as the initial vector data X, the output corresponding to the initial vector number X is the conversion vector data Y, and the convolution formula of the supervised learning model is expressed as Y=W*X+B, in, W and B are the parameters that need to be learned in the supervised learning process, which are characterized by: The chip side deployment parameter S of the supervised learning model, the transformation vector data Y1 = S*Y, the symbol transformation activation function and the scaling transformation activation function are set in the supervised learning model, After the conversion vector data Y is input into the sign transformation activation function, the output is the first output data Y'. When the conversion vector data Y is a positive number, Y' presents a first state, and when the conversion vector data Y is a negative number, Y' presents a second state. The first state is different from the second state. The conversion vector data Y is replaced by the conversion vector data Y1 and input into the sign transformation activation function. By observing the state of the first output data Y' output from the sign transformation activation function after the conversion vector data Y1 is input, the positive and negative signs of the parameter S are adjusted based on the difference between the first state and the second state. After the conversion vector data Y is input into the scaling transformation activation function, the second output data Y" is output. The second activation function has a non-linear interval. Once the conversion vector data Y is outside the non-linear interval, the second output data Y" will be at a constant value. The conversion vector data Y1 is used to replace the conversion vector data Y and input into the second activation function. By observing the numerical growth trend of the second output data Y" output from the second activation function after the conversion vector data Y1 is input, the absolute value of the parameter S is adjusted to ensure that the conversion vector data Y1 is always within the non-linear interval.

2. The system according to claim 1, It is characterized in that The sign transformation activation function is set to a Relu function.

3. The system according to claim 2, It is characterized in that When the conversion vector data Y is a positive number, the first output data Y' presents a first state in which it rises linearly and is always positive; when the conversion vector data Y is a negative number, the first output data Y' presents a second state in which it is always zero.

4. The system according to claim 3, It is characterized in that Adjust parameter S. If the conversion vector data Y is a positive number, the parameter S is selected to be positive. Thus, the transformation vector data Y1 is also a positive value. Using the transformation vector data Y1 as the independent variable of the Relu function, the output data of the Relu function will present a first state in which it increases linearly and is always positive.

5. The system according to claim 3, It is characterized in that If the conversion vector data Y is a negative number, the parameter S is selected to be a negative sign, thereby the transformation vector data Y1 is inverted to a positive value. Using the transformation vector data Y1 as the independent variable of the Relu function, the output data of the Relu function will present a first state in which it increases linearly and is always positive.

6. The system according to claim 1, It is characterized in that The scaling transformation activation function is set to the sigmoid function.

7. The system according to claim 6, It is characterized in that When the converted vector data Y is input into the sigmoid function, the second output data Y'' is output, and its non-linear interval is [-5,5].

8. The system according to claim 7, It is characterized in that Once the value of the conversion vector data Y exceeds 5, the function output value of the sigmoid function is 1. Then, with the intervention of parameter S, the transformation vector data Y1 replaces the conversion vector data Y and is input into the scaling transformation activation function to compress the transformation vector data Y1 within the interval [-5,5].