Method and apparatus for generating a fixed point neural network

By introducing the concept of fixed point neural networks into neural networks, selecting object layers, forming candidate parameter sets and updating quantitative parameters, the problem of insufficient performance when neural networks process complex input data on resource-limited devices in the prior art is solved, and efficient information extraction and performance maximization is achieved.

CN110020717BActive Publication Date: 2025-03-25SAMSUNG ELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201811479804.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-12-08
Filing Date
2018-12-05
Publication Date
2025-03-25
Estimated Expiration
2038-12-05

AI Technical Summary

Technical Problem

When existing neural network devices process complex input data, it is difficult to achieve real-time analysis and information extraction, especially on devices with limited resources such as smartphones, a technology that reduces the number of operations and maximizes the performance of artificial neural networks.

Method used

The target performance of the neural network is maximized by a fixed point neural network corresponding to a floating point neural network. The specific method includes selecting the layer of the neural network as the object layer, forming a candidate parameter set, determining the update parameter value based on the network performance level, and updating the quantization parameters of the object layer.

Benefits of technology

It realizes reducing the number of operations required to process complex input data on devices with limited resources, maximizing the performance of neural networks, and improving the network performance of fixed point neural networks by adjusting quantization parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110020717B_ABST
    Figure CN110020717B_ABST
Patent Text Reader

Abstract

A method and apparatus for generating a fixed point neural network are provided. The method includes: selecting at least one layer of a neural network as an object layer, wherein the neural network includes a plurality of layers, each of the plurality of layers corresponding to a corresponding one of a plurality of quantization parameters; forming a candidate parameter set, the candidate parameter set including candidate parameter values ​​for quantization parameters of the plurality of quantization parameters corresponding to the object layer; determining an update parameter value from among the candidate parameter values ​​based on a network performance level of the neural network, wherein each of the network performance levels corresponds to a corresponding one of the candidate parameter values; and updating the quantization parameter for the object layer based on the update parameter value.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the priority benefit of Korean Patent Application No. 10-2017-0168477 filed on December 8, 2017 in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference. Technical Field

[0003] Methods and apparatus consistent with example embodiments relate to neural networks, and more particularly, to methods and apparatus for generating fixed-point neural networks. Background Art

[0004] Neural network refers to a computer architecture that mimics biological networks in animal brains. As neural network technology develops, various electronic systems are actively researched that are configured to analyze input data and extract effective information using neural network devices that operate based on neural networks.

[0005] Neural network devices need to process a large number of operations on complex input data. In order for the neural network device to analyze the input data and extract information in real time, a technology for efficiently processing the operation of the neural network is required. In particular, systems with low power consumption and high performance, such as smartphones, have limited resources, so a technology that reduces the number of operations required for processing complex input data and maximizes the performance of the artificial neural network is required. Summary of the invention

[0006] The present application provides a method and apparatus for maximizing target performance of a neural network through a fixed-point neural network corresponding to a floating-point neural network.

[0007] According to an aspect of an example embodiment, a method for generating a fixed point neural network of a neural network system is provided, the method comprising: selecting at least one layer of a neural network as an object layer, wherein the neural network comprises a plurality of layers, each of the plurality of layers corresponding to a corresponding one of a plurality of quantization parameters; forming a candidate parameter set comprising candidate parameter values ​​for quantization parameters of the plurality of quantization parameters corresponding to the object layer; determining an update parameter value from among the candidate parameter values ​​based on a network performance level of the neural network, wherein each of the network performance levels corresponds to a corresponding one of the candidate parameter values; and updating the quantization parameter for the object layer based on the update parameter value.

[0008] According to an aspect of another example embodiment, a device for generating a fixed-point neural network is provided, the device comprising: a memory; and a processor configured to execute instructions stored in the memory to generate a fixed-point neural network, select one of multiple layers of a first fixed-point neural network as an object layer, and generate a second fixed-point neural network by updating a quantization parameter of the object layer based on network performance of the fixed-point neural network.

[0009] According to an aspect of yet another example embodiment, a method for generating a fixed-point neural network of a neural network system is provided, the method comprising: selecting at least one layer from among multiple layers of a first fixed-point neural network as an object layer; generating candidate parameter values ​​based on parameter values ​​of quantization parameter settings regarding the object layer; determining a network performance level, wherein each of the network performance levels corresponds to a corresponding one of the candidate parameter values; and updating the quantization parameter based on the candidate parameter values ​​of the multiple candidate parameter values, the candidate parameter values ​​corresponding to the highest network performance level. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Example embodiments will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:

[0011] Figure 1 is a block diagram of a neural network system according to an example embodiment;

[0012] Figure 2 An example of a neural network structure applied to a neural network system according to an example embodiment is shown;

[0013] Figure 3 is a flow chart of a method of generating a fixed point neural network according to an example embodiment;

[0014] Figure 4 is determined according to an example embodiment Figure 3 A flowchart of the operation of updating parameter values;

[0015] Figure 5 is a view for describing a method of deriving a network performance level corresponding to each of candidate parameter values ​​according to an exemplary embodiment;

[0016] Figure 6 is a flow chart of a method of generating a fixed point neural network according to an example embodiment;

[0017] Figure 7 is generated according to an example embodiment Figure 6 Flowchart of the method for fixed point neural network;

[0018] Figure 8 , Fig. 9 , Fig. 10A and Fig. 10B is a diagram showing an example of an order of quantization parameters based on update according to one or more example embodiments;

[0019] Fig.11 is generated according to an example embodiment Figure 6 Flowchart of the method for fixed point neural network;

[0020] Fig.12 is a block diagram of a neural network system and a quantization system according to an example embodiment;

[0021] Fig.13 is a block diagram of a computing system according to an example embodiment; and

[0022] Fig.14 is a block diagram of a portable computing device according to an exemplary embodiment. DETAILED DESCRIPTION

[0023] Hereinafter, example embodiments will be described in detail by referring to the accompanying drawings.

[0024] Figure 1 is a block diagram of a neural network system 10 according to an example embodiment, and Figure 2 An example of the structure of a neural network NN applied to the neural network system 10 according to an example embodiment is shown.

[0025] Neural network system 10 may provide a neural network (also referred to as an artificial neural network) to another system (such as a mobile computing system, a vehicle computing system, etc.), or may drive a neural network.

[0026] The neural network system 10 may be a system configured to provide (or drive) a neural network. The neural network system 10 may be referred to as a neural network device. For example, the neural network system 10 may include a computing device having various processing functions, such as a function of generating a neural network, a function of training (or learning) a neural network, a function of generating a fixed point neural network based on a floating point neural network, or a function of retraining a neural network. The neural network system 10 may include at least one processor and a memory to perform the functions. The neural network system 10 may include, but is not limited to, fixed computing systems such as desktop computers / servers, etc., and mobile computing systems such as laptop computers, smart phones, etc.

[0027] refer to Figure 1 The neural network system 10 may include a quantization module 110 and a parameter adjustment module 120 (also referred to as a quantization parameter adjustment module). According to an example embodiment, the quantization module 110 may be included in an additional quantization system configured to communicate with the neural network system 10.

[0028] The quantization module 110 can generate a neural network using fixed point numbers by quantizing the neural network using floating point numbers. That is, the quantization module 110 can convert the floating point neural network NN_FO into the first fixed point neural network NN_FX1 by quantizing the floating point neural network NN_FO.

[0029] refer to Figure 2 , the neural network NN may include multiple layers of L(1) to L(N) processed sequentially, and the neural network NN having the multi-layer structure may be referred to as a deep neural network (DNN) or a deep learning architecture. The neural network NN may include, but is not limited to, at least one of various types of neural network models (such as convolution neural network (CNN) (such as GoogLeNet, AlexNet, VGG network, etc.), region with convolution neural network (R-CNN), region proposal network (RPN), recurrent neural network (RNN), stacking-based deep neural network (S-DNN), state-space dynamic neural network (S-SDNN), deconvolution network, deep belief network (DBN), restricted Boltzman machine (RBM), fully convolutional network, long short-term memory (LSTM) network, classification network, etc.).

[0030] The neural network NN may perform an operation based on input data IN via a plurality of layers L(1) to L(N), and may generate output data OUT based on a result of the operation. The output data OUT may include at least one information signal. For example, the input data IN may be an image of a frame, and the output data OUT may include identification information about an object included in the image (or a plurality of probabilities corresponding to the object).

[0031] Each of the plurality of layers L(1) to L(N) may include at least one neuron (or processing node) NR. An input operation of each of the neurons NR may be referred to as an input activation operation, and an output operation of each of the neurons NR may be referred to as an output activation operation. An activation operation (e.g., a11 to a34) may be determined based on a weight (e.g., w21 to w33), a bias (e.g., b21 to b34), and an activation function (e.g., σ2 and σ3).

[0032] The neurons NR of adjacent layers may be connected to each other and may exchange data. One neuron NR may perform an operation by receiving data from other neurons NR, and may output the result of the operation to other neurons NR. For example, a neuron NR of the second layer L(2) may perform an operation by receiving data from a neuron NR of the first layer L(1), and may provide the result of the operation to a neuron NR of the third layer L(3). The neurons NR of adjacent layers may be completely or partially connected to each other. According to an example embodiment, one or more neurons NR may share weights.

[0033] Based on this multi-layer structure, the neural network NN may require computational complexity and therefore may require a large amount of computing resources. The neural network NN generated in the neural network system 10 via training (or learning) may be a floating-point neural network NN_FO, which may require more computing resources than a fixed-point neural network. The quantization module 110 may reduce the computational complexity of the neural network NN by converting the floating-point neural network NN_FO into a first fixed-point neural network NN_FX1 via quantization.

[0034] Quantization may refer to the process of limiting input values ​​to a discrete set of values ​​that is smaller than the number of input values. For example, a real number may be mapped to an integer value by rounding the real number to the nearest integer. For example, as described above, quantization in a neural network NN may be applied to neural network parameters, where the neural network parameters may include activations, weights, and biases, among others.

[0035] The floating point number used in the floating point neural network NN_FO may include a sign, an exponent and a fraction or mantissa, wherein each of the exponent and the fraction or mantissa may have a pre-arranged bit length (number of bits). The fixed point number used in the fixed point neural network may include an integer part and a fraction part, wherein the bit length (i.e., the fraction length (FL) of the fraction part) may vary. In some example embodiments, the integer part of the fixed point number may include a sign bit. Furthermore, the bit length representing the fixed point number may be less than the bit length representing the floating point number.

[0036] The quantization module 110 may convert the floating-point neural network NN_FO into a fixed-point neural network, ie, the first fixed-point neural network NN_FX1, by determining quantization parameters (such as fraction length, sign, bit length, etc.) regarding the neural network parameters.

[0037] The quantization module 110 may perform quantization by considering the processing performance of a device (e.g., a mobile device, an embedded device, etc.) to which the neural network NN is deployed. The device to which the neural network NN is deployed may include, for example, an autonomous vehicle, a robotic device, a smart phone, a tablet device, an augmented reality (AR) device, an Internet of Things (IoT) device, etc., which is configured to perform speech recognition, image recognition, etc. by using a neural network.

[0038] Furthermore, the quantization module 110 may perform quantization so that the quantization error may be minimized. That is, the quantization module 110 may calculate a quantization parameter by using various quantization methods, and minimize the quantization error via the quantization parameter. For example, the quantization module 110 may calculate a quantization parameter based on at least one moment (e.g., mean value, variance, etc.) related to the distribution of the neural network parameters (i.e., the distribution of the neural network parameter values), an approximated density function (ADF) of the distribution of the neural network parameters, statistical features of the neural network parameters (e.g., generalized gamma distribution), etc., and minimize the quantization error via the quantization parameter. For example, the quantization module 110 may calculate a fractional length to minimize the quantization error.

[0039] The quantization module 110 may perform quantization on each of the plurality of layers L(1) to L(N), and thus may determine a quantization parameter on each of the plurality of layers L(1) to L(N). The first fixed point neural network (NN_FX1) output from the quantization module 110 may include quantization parameters (e.g., QP(1), QP(2), ..., QP(N)) on the plurality of layers L(1) to L(N), respectively.

[0040] In the process of quantizing the floating-point neural network NN_FO via the quantization module 110, network performance (such as accuracy) may be reduced. Therefore, the first fixed-point network NN_FX1 may have reduced network performance compared to the floating-point neural network NN_FO.

[0041] The parameter adjustment module 120 may adjust the quantization parameters of the first fixed point neural network NN_FX1. That is, the parameter adjustment module 120 may generate a second fixed point neural network NN_FX2 by adjusting (or updating) the quantization parameters of at least one layer from among the multiple layers L(1) to L(N) based on the network performance, and change the quantization parameters of at least one layer in the fixed point neural network NN_FX2. The second fixed point neural network NN_FX2 may include quantization parameters (e.g., QP(1), QP(2)', ..., QP(N)') respectively about the multiple layers L(1) to L(N), wherein one or more quantization parameters of the second fixed point neural network NN_FX2 may be different from the quantization parameters of the first fixed point neural network NN_FX1. Here, the network performance refers to the target performance of the neural network NN, and may include, for example, the accuracy of the neural network NN derived based on at least one reference. The network performance may be derived based on various metrics or evaluation references configured to evaluate the objective function of the neural network NN.

[0042] The parameter adjustment module 120 may select at least one layer about which a quantization parameter is to be updated from among the plurality of layers L(1) to L(N) of the first fixed point neural network NN_FX1 as a target layer, and may form a candidate parameter set including candidate parameter values ​​related to the quantization parameter of the target layer. According to an example embodiment, the candidate parameter values ​​may be derived via an arithmetic operation based on a preset quantization parameter value. According to an example embodiment, the candidate parameter values ​​may be derived based on information obtained during a quantization process.

[0043] The parameter adjustment module 120 can drive the first fixed point neural network NN_FX1 by applying each of the candidate parameter values ​​to the quantization parameter of the object layer, and can derive the network performance, i.e., the network performance level corresponding to each of the candidate parameter values, based on the result of driving the first fixed point neural network NN_FX1. The parameter adjustment module 120 can determine the candidate parameter value corresponding to the highest network performance level from among the candidate parameter values ​​as the update parameter value, and can update the quantization parameter of the object layer based on the update parameter value. Therefore, the parameter adjustment module 120 can update the quantization parameter of the object layer based on the network performance.

[0044] According to an example embodiment, the parameter adjustment module 120 may update the quantization parameters of at least one of the plurality of layers L(1) to L(N) with respect to the first fixed point neural network NN_FX1. For example, the parameter adjustment module 120 may sequentially update the quantization parameters of the plurality of layers L(1) to L(N) with respect to the first fixed point neural network NN_FX1. For example, the parameter adjustment module 120 may update the quantization parameters of the plurality of layers L(1) to L(N) (i.e., the first layer L(1) to the Nth layer L(N)) based on a predetermined order. For example, the parameter adjustment module 120 may update the quantization parameters of the plurality of layers L(1) to L(N) in a backward direction from the Nth layer L(N) as the last layer to the first layer L(1) . Alternatively, the parameter adjustment module 120 may update the quantization parameters regarding multiple layers L(1) to L(N) in a backward direction starting from the Nth layer L(N) as described above, and may then update the quantization parameters regarding multiple layers L(1) to L(N) in a forward direction, ending with the Nth layer L(N).

[0045] For example, the parameter adjustment module 120 may sequentially update the quantization parameters of the plurality of layers L(1) to L(N) until the network performance becomes equal to or higher than the reference level. However, example embodiments are not limited thereto. The parameter adjustment module 120 may update the quantization parameters of one or more of the plurality of layers L(1) to L(N) of the first fixed point neural network NN_FX1 based on a combination of the described example orders and conditions or other orders and conditions.

[0046] As described above, the parameter adjustment module 120 may generate a second fixed point neural network NN_FX2 by adjusting a quantization parameter of at least one layer of the first fixed point neural network NN_FX1 based on network performance, wherein the network performance of the second fixed point neural network NN_FX2 may be higher than that of the first fixed point neural network NN_FX1.

[0047] As described above, the neural network system 10 according to the example embodiment may generate a second fixed point neural network NN_FX2 having improved performance by adjusting the quantization parameters of the first fixed point neural network NN_FX1 generated via quantization. Also, the neural network system 10 according to the example embodiment may generate a first fixed point neural network NN_FX1 by performing quantization on a floating point neural network NN_FO so that the quantization error is minimized, and then may generate a second fixed point neural network NN_FX2 by adjusting the quantization parameters of the first fixed point neural network NN_FX1 in consideration of general network performance. Therefore, the complexity of the quantization process may not increase, and the network performance of the fixed point neural network may improve. Hereinafter, reference will be made to Figures 3 to 12A method of adjusting a quantization parameter, that is, a method of generating a fixed-point neural network whose quantization parameter is updated, according to an exemplary embodiment is described in detail.

[0048] Figure 3 is a flow chart of a method for generating a fixed point neural network according to an example embodiment. In detail, Figure 3 The example embodiment shown in FIG. 1 generates a fixed-point neural network with improved network performance by adjusting the quantization parameters of the fixed-point neural network, and can be Figure 1 Therefore, reference Figure 1 The described aspects can be applied to the present exemplary embodiment.

[0049] refer to Figure 1 and Figure 3 , the parameter adjustment module 120 may generate a fixed point neural network about the neural network in operation S110. That is, the parameter adjustment module 120 may generate a fixed point neural network by quantizing the floating point neural network. The fixed point neural network (e.g., Figure 1 The first fixed point neural network NN_FX1) may include a plurality of layers, and may include quantization parameters of neural network parameters such as activation, bias, weight, etc. for each of the plurality of layers. For example, the quantization parameters may include fraction length, bit length, etc. According to an example embodiment, the fixed point neural network is composed of a quantization module ( Figure 1 110) is generated, and the parameter adjustment module 120 can receive the fixed point neural network from the quantization module 110.

[0050] In operation S120, the parameter adjustment module 120 may select a target layer whose quantization parameter is to be updated from among the multiple layers of the fixed point neural network. According to an example embodiment, when the fixed point neural network includes N sequentially processed layers, the parameter adjustment module 120 may select the last layer (i.e., the Nth layer) of the multiple layers as the target layer. The parameter adjustment module 120 may select the last layer that most affects the network performance of the neural network from among the multiple layers as the target layer, so as to effectively improve the network performance. However, the example embodiment is not limited thereto, and the parameter adjustment module 120 may select other layers that affect the network performance of the neural network as the target layer.

[0051] According to example embodiments, the fixed-point neural network may include layers processed in parallel (or modules included in one layer), and the parameter adjustment module 120 may select a plurality of layers or a plurality of modules processed in parallel as the target layer.

[0052] In operation S130, the parameter adjustment module 120 may determine an updated parameter value for a quantization parameter of an object layer based on network performance. Network performance is a target performance of a neural network (i.e., a fixed point neural network), and may include, for example, an accuracy of the neural network derived based on at least one reference. For example, when the purpose of the neural network is to perform image classification, the network performance may include a top 1 accuracy and / or a top 5 accuracy. When the purpose of the neural network is to perform sound recognition, the network performance may include a word error rate. According to an example embodiment, the network performance may be derived based on an evaluation reference used in an evaluation of a training process for a floating point neural network, and the fixed point neural network is based on the network performance. In addition, the network performance may be derived based on various metrics to evaluate the function targeted by the neural network, or an evaluation reference.

[0053] The parameter adjustment module 120 may determine an updated parameter value to maximize network performance. For example, the parameter adjustment module 120 may form a plurality of candidate parameter values, and may select a candidate parameter value through which the network performance of the neural network is maximized from among the plurality of candidate parameter values ​​as an updated parameter value for the quantization parameter of the object layer.

[0054] The parameter adjustment module 120 may update the quantization parameter of the object layer based on the determined update parameter value in operation S140. Based on the update of the quantization parameter, the network performance of the fixed point neural network may be improved. In the case of layers other than the object layer, the quantization parameter may not be updated and the previous parameter value may be maintained. Therefore, the network performance level before updating the quantization parameter of the object layer may be compared with the network performance level after updating the quantization parameter of the object layer, so as to evaluate how much the update of the quantization parameter of the object layer contributes to improving the network performance of the fixed point neural network.

[0055] Figure 4 Yes Figure 3 A flowchart of the operation of updating parameter values, and Figure 5 is a view for describing an example of a method of deriving a network performance level corresponding to each of candidate parameter values.

[0056] refer to Figure 4 , the parameter adjustment module 120 may form a candidate parameter set regarding the quantization parameter of the object layer, and may select one of the candidate parameter values ​​included in the candidate parameter set as an update parameter value.

[0057] refer to Figure 4 In operation S31, the parameter adjustment module 120 may form a candidate parameter set including candidate parameter values ​​based on a preset parameter value of a quantization parameter of an object layer, ie, a current parameter value.

[0058] For example, when the fraction length is a quantization parameter, the parameter adjustment module 120 may adjust the value of the fraction length based on the object layer L. T (t) the current fractional length value FL (t) , forming a candidate parameter set including candidate parameter values ​​(eg, M candidate parameter values, where M is an integer greater than or equal to 2). Candidate parameter set S (t) It can be expressed by Equation 1.

[0059] [Equation 1]

[0060]

[0061] Here, e, It is about the object layer L T (t) is the Mth candidate parameter value.

[0062] According to an example embodiment, the parameter adjustment module 120 may generate a candidate parameter value via an arithmetic operation based on the current parameter value. According to another example embodiment, the parameter adjustment module 120 may generate a candidate parameter value based on additional information derived in a quantization process. For example, the current parameter value is a parameter value from among a plurality of parameter values ​​derived in a quantization process, via which a quantization error is minimized, and other parameter values ​​from among the plurality of parameter values ​​(via which the quantization error is equal to or less than a critical value) may be provided as additional information to the parameter adjustment module 120. The parameter adjustment module 120 may form a candidate parameter set including a parameter value (via which the quantization error is equal to or less than a critical value) based on the current parameter value and the additional information.

[0063] As above reference Figure 3 As described above, in operation S120, when the parameter adjustment module 120 selects multiple layers or modules to be processed in parallel as the target layers, the parameter adjustment module 120 may form the candidate parameter set as a set of parameter values ​​corresponding to the multiple layers or modules. T (t1) and the second object layer L T (t2) and the first object layer L T (t1) and the second object layer L T When each of (t2) includes three candidate parameter values, the candidate parameter set can be expressed by Equation 2.

[0064] [Equation 2]

[0065]

[0066] Thereafter, the parameter adjustment module 120 may derive a level of network performance corresponding to each of the candidate parameter values ​​in operation S32. Figure 5An example of a method of deriving a network performance level corresponding to each of the candidate parameter values ​​is described.

[0067] refer to Figure 5 , the fixed point neural network may include first to Nth layers L(1) to L(N), and a fraction length (FL) of each of the first to Nth layers L(1) to L(N) may be set as a quantization parameter. That is, the fraction length value FL (1) To FL (N) It can be set with respect to the first to Nth layers L(1) to L(N).

[0068] When the Nth layer L(N) is set as the object layer, the fractional length value FL (t) , i.e. the fractional length value FL(N) of the Nth layer L(N), forms a candidate parameter set S about the object layer (t) , and about the candidate parameter set S (t) Candidate parameter values ​​for Network performance level (i.e., a candidate fractional length value) may be derived. For example, the parameter adjustment module 120 may not change the fractional lengths of the first to N-1th layers L(1) to L(N-1) (the remaining layers except the object layer), and may change the fractional length of the Nth layer L(N) (the object layer) from the current fractional length value FL(N) to the candidate parameter value In this way, the network performance level can be derived by driving the fixed point neural network based on the fractional length set for each of the first to Nth layers L(1) to L(N). The parameter adjustment module 120 can sequentially evaluate the candidate parameter values network performance in order to derive the corresponding candidate parameter values Network performance level

[0069] The network performance level refers to the target performance level of the neural network. Figure 3 As described above, the network performance level can be derived based on the classification and goal of the neural network. For example, when the purpose of the neural network is to perform sound recognition, the parameter adjustment module 120 can drive the fixed point neural network by using a plurality of sound samples (SAM) as input data, can output sound recognition results (RES), and can derive the network performance level as a word error rate based on RES.

[0070] According to an example embodiment, the network performance level may be derived by performing a weighted sum operation on a plurality of performance levels calculated based on different references (eg, K (integer greater than 1) performance levels). The level P of the network performance may be represented by Equation 3.

[0071] [Equation 3]

[0072] P=∑ K w i *P i

[0073] Here, W i and P i respectively indicate the i-th weight and the i-th performance level among the K performance levels.

[0074] For example, when the purpose of the neural network is to perform image classification, the fixed point neural network can be driven by using multiple image samples as input data, and an image recognition signal indicating the predicted category of the image sample (or the probability distribution of multiple categories) can be calculated. The top 1 accuracy and the top 5 accuracy can be derived based on the calculated image recognition signal. The top 1 accuracy indicates the case where one category predicted by the fixed point neural network is the correct answer (or not the correct answer), and the top 5 accuracy indicates the case where the correct answer is included (or not included) in the 5 categories predicted by the fixed point neural network. The network performance P can be derived via a weighted sum operation based on the weights set to each of the top 1 accuracy and the top 5 accuracy.

[0075] As another example, when the purpose of the neural network is to perform object detection, the network performance levels may be calculated separately with respect to different objects. For example, the network performance level with respect to the detection of a first object such as a vehicle and the network performance level with respect to the detection of a second object such as a pedestrian may be calculated. Then, a weighted sum operation may be performed based on the weights set to the network performance levels corresponding to each of the different objects to derive the network performance P. In addition, the parameter adjustment module 120 may derive the network performance level of the neural network by taking into account various performance levels calculated based on various references related to the objectives of the neural network.

[0076] In addition, reference Figure 4 In operation S33, the parameter adjustment module 120 may compare the network performance levels corresponding to the candidate parameter values ​​with each other, and may select the update parameter value based on the comparison result. According to an example embodiment, the candidate parameter value corresponding to the highest network performance level from among the levels of network performance may be selected as the update parameter value. For example, regarding the candidate parameter value The network performance levels derived separately can be compared with each other, and when the network performance level is the highest, the candidate parameter value can be selected as the updated parameter value. The updated parameter value fl′ can be expressed by Equation 4.

[0077] [Equation 4]

[0078] fl′=argmaxP(fl (t) )

[0079] The updated parameter value fl′ may be different from the current parameter value (e.g., the current fraction length FL (t) ) The same situation may occur. In this case, the parameter adjustment module 120 can identify the object layer L of the fixed point neural network T The parameter value of (t) is the value that maximizes the network performance.

[0080] Figure 6 is a flowchart of a method of generating a fixed point neural network according to an example embodiment. Figure 6 An example embodiment of Figure 1 The parameter adjustment module 120 is used to perform the above operation. Figure 1 and Figure 3 The described aspects can be applied to the present exemplary embodiment.

[0081] refer to Figure 6 , the parameter adjustment module 120 may generate a fixed point neural network in operation S210, and in operation S220, may select an object layer whose quantization parameter is to be updated from among a plurality of layers of the fixed point neural network. The parameter adjustment module 120 may determine an update parameter value for the quantization parameter of the object layer based on network performance in operation S230. The parameter adjustment module 120 may update the quantization parameter of the object layer based on the update parameter value in operation S240. Operations S210, S220, S230, and S240 correspond to Figure 3 Operations S110, S120, S130, and S140 are described below, and thus a description thereof will not be repeated.

[0082] Thereafter, in operation S250, the parameter adjustment module 120 may determine whether the update end condition is satisfied. When the parameter adjustment module 120 determines that the update end condition is not satisfied, the parameter adjustment module 120 may change the object layer in operation S260 based on operations S230 and S240 and perform an update operation of the quantization parameter, thereby updating the quantization parameters of the plurality of layers until the update end condition is satisfied.

[0083] According to an example embodiment, the update end condition may include a preset number of object layers or a preset number of update layers. For example, when the preset number of object layers is 5, the parameter adjustment module 120 may sequentially update the quantization parameters of 5 layers among the multiple layers of the fixed point neural network. And, when the preset number of updated layers is 3, the parameter adjustment module 120 may repeatedly update the quantization parameters of the multiple layers of the fixed point neural network by changing the object layer until the quantization parameters of the 3 layers are changed from the previously set parameter values ​​to other values, i.e., the parameter values ​​are updated.

[0084] According to example embodiments, the update end condition may include whether all quantization parameters of multiple layers of the fixed point neural network are updated, whether quantization parameters of multiple layers are updated from the last layer to the first layer in a backward direction and then from the first layer to the last layer in a forward direction, etc.

[0085] According to an example embodiment, the update end condition may be set based on the network performance. For example, the update end condition may include: a condition in which the network performance of the fixed point neural network is reduced to be less than a predetermined degradation reference value compared to the floating point neural network, a condition in which the network performance of the fixed point neural network is increased to be equal to or greater than a predetermined reference value, etc.

[0086] Regarding the change of the object layer, the changed object layer may be a previous layer or a next layer of the current object layer, and the update of the quantization parameter is performed on the object layer. For example, when the update of the quantization parameter is performed on the last layer, the previous layer of the last layer may be set as the object layer. And, when the update of the quantization parameter is performed on the first layer, the second layer may be set as the object layer.

[0087] In this manner, the parameter adjustment module 120 may maximize the network performance of the fixed-point neural network by repeatedly updating the quantization parameters of at least one of the multiple layers of the fixed-point neural network.

[0088] Figure 7 Is generated Figure 6 Flowchart of an example of a fixed-point neural network method.

[0089] refer to Figure 7 In operation S210a, the parameter adjustment module 120 may generate a fixed point neural network including N layers. Quantization parameters QP(1), QP(2), QP(3), ..., QP(N) may be set for the N layers, respectively. For ease of explanation, Figure 7 It is shown that one quantization parameter is set for each of the N layers. However, example embodiments are not limited thereto. A plurality of quantization parameters may be set for each of the N layers.

[0090] The parameter adjustment module 120 may select the Nth layer as the target layer in operation S220A. For example, the Nth layer affects the network performance of the fixed-point neural network more than other layers, and therefore, the parameter adjustment module 120 may select the Nth layer as the target layer.

[0091] In operation S230a, the parameter adjustment module 120 may determine an updated parameter value for a quantization parameter of the relevant object layer (i.e., the Nth layer) based on network performance. In detail, in operation S231a, the parameter adjustment module 120 may form a candidate parameter set for a quantization parameter QP(N) of the relevant Nth layer (object layer). For example, the parameter adjustment module 120 may form a candidate parameter set by generating a candidate parameter based on a currently set value for the quantization parameter QP(N).

[0092] In operation S232a, the parameter adjustment module 120 may derive a network performance level corresponding to each of the candidate parameter values ​​of the candidate parameter set. The parameter adjustment module 120 may apply each of the candidate parameter values ​​as a quantization parameter of the object layer (i.e., the Nth layer), and may drive a fixed point neural network to derive a network performance level for each of the candidate parameter values.

[0093] In operation S233a, the parameter adjustment module 120 may select an update parameter value based on the result of comparing the network performance levels corresponding to the candidate parameter values. The parameter adjustment module 120 may compare the network performance levels of the candidate parameter values ​​with each other and may select the candidate parameter value corresponding to the highest network performance level as the update parameter value.

[0094] In operation S240a, the parameter adjustment module 120 may update the quantization parameter of the target layer (ie, the Nth layer) based on the update parameter value. When the update parameter value is different from the currently set parameter value, the network performance of the fixed point neural network may be improved.

[0095] In operation S250a, the parameter adjustment module 120 may determine whether the target layer is the first layer. As described above, the current target layer is the Nth layer. Therefore, the parameter adjustment module 120 may determine that the condition for ending the update of the quantization parameter is not satisfied, and may change the target layer.

[0096] In operation S260a, the parameter adjustment module 120 may change the target layer to an upper layer, ie, the N-1th layer. The parameter adjustment module 120 may update the quantization parameter with respect to the changed target layer by performing operations S230a and S240b.

[0097] Figure 8 , Fig. 9 , Fig. 10A and Fig. 10Bis a view showing an example based on an order of updating a quantization parameter according to an exemplary embodiment.

[0098] refer to Figure 8 , the parameter adjustment module 120 may perform the update of the quantization parameter in the backward direction from the last layer (i.e., the Nth layer) to the first layer L(1). Therefore, the quantization parameter of at least one of the first to Nth layers L(1) to L(N) of the fixed point neural network may be updated.

[0099] refer to Fig. 9 , the parameter adjustment module 120 may perform an update of the quantization parameter in a backward direction from the last layer (i.e., the Nth layer) to the first layer L(1). Then, the parameter adjustment module 120 may also perform an update of the quantization parameter in a forward direction from the first layer L(1) to the Nth layer L(N). According to an example embodiment, the parameter adjustment module 120 may perform an update of the quantization parameter multiple times in the backward and forward directions until the network performance level reaches the target level of the network performance.

[0100] refer to Fig. 10A and Fig. 10B , one or more layers (e.g., the third layer L(3)) of the fixed-point neural network may include multiple modules, e.g., first to fifth modules M(1) to M(5). Fig. 10A and 10B The fixed point neural network is shown to include the first to fourth layers L(1) to L(4) and the first to fifth modules M(1) to M(5). However, for ease of explanation, Fig. 10A and Fig. 10B The example embodiments shown in FIG. 1 and FIG. 2 , and depending on the type of the neural network (also referred to as a neural network model), the number of layers and the number of modules of the fixed-point neural network may vary.

[0101] refer to Fig. 10A , the parameter adjustment module 120 may sequentially update the quantization parameters of the multiple layers and the multiple modules in the backward direction and the forward direction in the order shown. Specifically, the fourth layer L(4) may be updated first, followed by the third module M(3), the fourth module M(4), the fifth module M(5), the first module M(1), the second module M(2), the second layer L(2), and the first layer L(1). Then, the second layer L(2) may be updated again, followed by the second module M(2), the first module M(1), the fifth module M(5), the fourth module M(4), the third layer module M(3), and the fourth layer L(4).

[0102] And, reference Fig. 10B, the parameter adjustment module 120 can sequentially update the quantization parameters of multiple layers in the declared order, sequentially in the backward direction and the forward direction, and simultaneously update the quantization parameters of multiple modules. Specifically, the fourth layer L(4) can be updated first, followed by the simultaneous update of the third module M(3), the fourth module M(4) and the fifth module M(5), followed by the simultaneous update of the first module M(1) and the second module M(2), followed by the update of the second layer L(2), and then the first layer L(1). Then, the second layer L(2) can be updated again, followed by the simultaneous update of the first module M(1) and the second module M(2), followed by the simultaneous update of the third module M(3), the fourth module M(4) and the fifth module M(5), and then the additional update of the fourth layer L(4).

[0103] Fig.11 is generated according to an example embodiment Figure 6 Flowchart of an example of a fixed-point neural network method. Fig.11 An example is shown in which an update is performed with respect to fractional lengths.

[0104] refer to Fig.11 , the parameter adjustment module 120 may generate a fixed point neural network including N layers in operation S210b. Quantization parameters QP(1), QP(2), QP(3), . . . , QP(N) may be set for the N layers, respectively.

[0105] In operation S220b, the parameter adjustment module 120 may select the Nth layer as the target layer.

[0106] In operation S230b, the parameter adjustment module 120 may determine an updated fractional length value regarding the fractional length of the relevant object layer (i.e., layer N) based on the network performance. As described above, the parameter adjustment module 120 may form a candidate parameter set regarding the fractional length based on the currently set fractional length value, and may compare network performance levels regarding candidate parameters included in the candidate parameter set with each other to determine the updated fractional length value.

[0107] In operation S240b, the parameter adjustment module 120 may update the fractional length of the object layer (i.e., the Nth layer) based on the updated fractional length value. In operation S250b, the parameter adjustment module 120 may determine whether the network performance level is equal to or higher than the reference value, and when the network performance level is less than the reference value, the fractional lengths of other layers may be updated. In operation S260b, the parameter adjustment module 120 may change the object layer. The parameter adjustment module 120 may select other layers (except the Nth layer) of multiple layers as the object layer. For example, the parameter adjustment module 120 may select the N-1th layer as the object layer. As described above, the parameter adjustment module 120 may change the object layer in the backward direction or the forward direction. The parameter adjustment module 120 may update the fractional length of the changed object layer by performing operations S230b and S240b. The parameter adjustment module 120 may repeatedly update the fractional lengths of multiple layers until the network performance level becomes equal to or greater than the reference value, and may end the updating of the fractional length when the network performance level is equal to or greater than the reference value.

[0108] Fig.12 is a block diagram of a neural network system 10a and a quantization system 20a according to an example embodiment. Fig.12 As shown, the neural network system 10a and the quantization system 20a may be implemented as separate computing systems.

[0109] refer to Fig.12 , the neural network system 10a may provide the floating point neural network NN_FO to the quantization system 20a, and the quantization system 20a may quantize the floating point neural network NN_FO to generate a first fixed point neural network NN_FX1. The first fixed point neural network NN_FX1 may include quantization parameters (e.g., QP(1), QP(2), ..., QP(N)) for a plurality of layers L(1) to L(N), respectively.

[0110] The neural network system 10a may include a parameter adjustment module 120a, and the parameter adjustment module 120a may update the quantization parameter of at least one of the multiple layers of the first fixed point neural network NN_FX1, as shown in FIG. Figures 1 to 11 said, in order to generate a second fixed point neural network NN_FX2 with improved network performance,

[0111] According to an example embodiment, the quantization system 20a may receive a floating point neural network NN_FO from another neural network system. The neural network system 10a including the parameter adjustment module 120a may be a device in which the first fixed point neural network NN_FX1 is deployed. For example, the neural network system 10a may be a computing device configured to generate a second fixed point neural network NN_FX2 based on the first fixed point neural network NN_FX1 and perform various tasks based on a neural network based on the second fixed point neural network NN_FX2.

[0112] Fig.13 is a block diagram of a computing system 200 according to an example embodiment. In some example embodiments, Figure 1 Neural network system 10 and Fig.12 The neural network system 10a can be implemented as Fig.13 The computing system 200. Fig.13 As shown, computing system 200 may include system memory 210, processor 230, storage 250, input and output (IO) devices 270, and communication connections 290. Components included in computing system 200 may communicate with each other and may be connected to each other, for example, via a bus.

[0113] The system memory 210 may include a program 212. According to an example embodiment, the program 212 may allow the processor 230 to update the quantization parameters of the fixed point neural network (e.g., the first fixed point neural network NN_FX1). For example, the program 212 may include an ordered list of instructions executable by the processor 230, and the processor 230 may execute a plurality of instructions included in the program 212 to update the quantization parameters of the fixed point neural network. The system memory 210 may include, but is not limited to, volatile memories such as static random access memory (SRAM) and dynamic random access memory (DRAM), and non-volatile memories such as flash memories, etc.

[0114] The processor 230 may include at least one core configured to execute a set of instructions (e.g., Intel Architecture-32 (IA-32), extended 64-bit IA-32, x86-64, PowerPC, Sparc, MIPS, ARM, IA-64, etc.). The processor 230 may execute instructions stored in the system memory 210, and may update the quantization parameters of the fixed point neural network by executing the program 212.

[0115] Even if the power supplied to the computing system 200 is blocked, the storage 250 does not lose the stored data. For example, the storage 250 may include a non-volatile memory (such as an electrically erasable programmable read-only memory (EEPROM), a flash memory, a phase change random access memory (PRAM), a resistance random access memory (RRAM), a nano floating gate memory (NFGM), a polymer random access memory (PoRAM), a magnetic random access memory (MRAM), a ferroelectric random access memory (FRAM), etc.) or may include a storage medium (such as a tape, an optical disk, a magnetic disk, etc.). In some example embodiments, the storage 250 may be separated from the computing system 200.

[0116] In some example embodiments, storage 250 may store a program 212 configured to control updating of a quantization parameter of a fixed point neural network according to example embodiments, and before program 212 is executed by processor 230, program 212 or at least a portion of program 212 may be loaded from storage 250 to system memory 210. In some example embodiments, storage 250 may store a file written in a programming language, and program 212 or at least a portion of program 212 generated based on the file by a compiler or the like may be loaded to system memory 210.

[0117] In some example embodiments, storage 250 may store data to be processed by processor 230 and / or data processed by processor 230. For example, storage 250 may store neural network parameters and input samples. Also, storage 250 may store parameters of a generated fixed-point neural network, i.e., quantized neural network parameters and quantized parameters.

[0118] IO devices 270 may include input devices such as keyboards, pointing devices, etc. and output devices such as displays, printers, etc. For example, a user may trigger execution of program 212 via processor 230 by using IO devices 270 .

[0119] Communications connection 290 may provide access to a network external to computing system 200. For example, a network may include multiple computing systems and a communications link, and the communications link may include a wired link, an optical link, a wireless link, or some other link.

[0120] Fig.14 is a block diagram of a portable computing device 300 according to an example embodiment. In some example embodiments, according to example embodiments, a fixed point neural network (e.g., Figure 1 The second fixed point neural network NN_FX2) can be driven by a portable computing device 300. The portable computing device 300 may include, but is not limited to, a portable electronic device powered by a battery or a private power station (such as a mobile phone, a tablet personal computer (PC), a wearable device, an Internet of Things (IoT) device, etc.).

[0121] According to an example embodiment, as described with reference to the above example embodiments, the portable computing device 300 may receive a fixed point neural network (eg, Figure 1 The first fixed point neural network NN_FX1) is obtained, and the quantization parameters of the fixed point neural network can be updated.

[0122] like Fig.14 As shown, the portable computing device 300 may include a memory subsystem 310, an IO device 330, a processing unit 350, and a network interface 370, wherein the memory subsystem 310, the IO device 330, the processing unit 350, and the network interface 370 may communicate with each other via a bus 390. In some example embodiments, at least two of the memory subsystem 310, the IO device 330, the processing unit 350, and the network interface 370 may be included in one package as a system-on-a-chip (SoC).

[0123] Memory subsystem 310 may include RAM 312 and storage 314. RAM 312 and / or storage 314 may store an ordered list of instructions to be executed by processing unit 350 and data to be processed by processing unit 350. For example, RAM 312 and / or storage 314 may store variables (such as signals, weights, and biases) of a neural network, and may store parameters of neurons (or processing nodes) of the neural network. In some example embodiments, storage 314 may include non-volatile memory.

[0124] The processing unit 350 may include a central processing unit (CPU) 352, a graphics processing unit (GPU) 354, a digital signal processor (DSP) 356, and a neural processing unit (NPU) 358. Fig.14 As illustrated in the figure, in some example embodiments, the processing unit 350 may include at least one of a CPU 352 , a GPU 354 , a DSP 356 , and a NPU 358 .

[0125] The CPU 352 may directly perform general operations of the portable computing device 300. For example, the CPU 352 may directly perform certain tasks in response to receiving external inputs, for example, via the IO device 330, or may instruct other components of the processing unit 350 to perform certain tasks. The GPU 354 may generate data for image output via a display included in the IO device 330, or may encode data received from a camera included in the IO device 330. The DSP 356 may generate valid data by processing digital signals (for example, digital signals provided from the network interface 370).

[0126] The NPU 358 may be hardware designed for a neural network, and may include a plurality of computing nodes corresponding to one or more neurons included in the neural network, wherein one or more of the plurality of computing nodes may process signals in parallel.

[0127] The fixed-point neural network in which parameters are updated quantized according to example embodiments may have improved network performance, reduced computational complexity, and may be simply operated by the processing unit 350 .

[0128] The IO device 330 may include an input device (such as a touch input device, a sound input device, a camera, etc.) and an output device (such as a display device, a sound output device, etc.). For example, when a user voice is input via the sound input device, the voice may be recognized by a fixed point neural network driven by the portable computing device 300, and an operation based on voice recognition may be triggered. Also, when an image is input via a camera, an object included in the image may be recognized by a fixed point neural network driven by the portable computing device 300, and an output such as virtual reality may be provided to the user. As described above, the fixed point neural network in which the quantization parameter is updated according to the example embodiment may have improved network performance and may provide accurate information to the user.

[0129] The network interface 370 may access mobile communication networks such as long term evolution (LTE), 5G, etc., and may provide access to a local network such as WiFi.

[0130] The various operations of the above-described methods may be performed by any suitable means capable of performing the operations, such as various hardware and / or software component(s), circuits, and / or module(s).

[0131] The software may include an ordered listing of executable instructions for implementing logical functions and may be embodied in any "processor-readable medium" for use by or in conjunction with an instruction execution system, apparatus or device (such as a single-core processor or multi-core processor or a system including a processor).

[0132] The blocks or steps of the methods or algorithms and functions described in conjunction with the embodiments disclosed herein may be directly embodied in hardware, in a software module executed by a processor, or in a combination of the two. If implemented in software, the functions may be stored as one or more instructions or codes on a tangible, non-transient computer-readable medium or transmitted thereon. The software module may reside in a random access memory (RAM), a flash memory, a read-only memory (ROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a register, a hard disk, a removable disk, a CDROM, or any other form of storage medium known in the art.

[0133] Above, example embodiments are described with reference to the accompanying drawings in the specification. Throughout the specification, certain terms are used to describe example embodiments. However, these terms should be considered only in a descriptive sense for example embodiments, and not for limiting purposes. Therefore, it should be understood by those of ordinary skill in the art that various modifications and changes may be made without departing from the scope of the present disclosure. Therefore, the scope of the present disclosure is defined not by the detailed description but by the appended claims.

Claims

1. A method for generating a fixed point neural network of a neural network system, the method comprising: selecting at least one layer of a neural network as a target layer, wherein the neural network includes a plurality of layers, each of the plurality of layers corresponding to a respective one of a plurality of quantization parameters; forming a candidate parameter set, the candidate parameter set including candidate parameter values ​​for a quantization parameter among a plurality of quantization parameters corresponding to the target layer; determining an update parameter value from among the candidate parameter values ​​based on a network performance level of the neural network, wherein each of the network performance levels corresponds to a respective one of the candidate parameter values; as well as A quantization parameter for the target layer is updated based on the update parameter value.

2. The method according to claim 1, wherein: The forming of the candidate parameter set includes generating the candidate parameter values ​​via an arithmetic operation based on a parameter value set as a quantization parameter with respect to the target layer.

3. The method according to claim 1, wherein: The selecting includes selecting a last layer of the plurality of layers as the object layer.

4. The method according to claim 1, wherein: Determining the update parameter value includes: deriving a network performance level of the neural network, each of the network performance levels corresponding to a respective one of the candidate parameter values; comparing the network performance levels; and A candidate parameter value is selected from among the candidate parameter values ​​corresponding to the highest network performance level as the updated parameter value.

5. The method according to claim 4, wherein: deriving the network performance level of the neural network includes deriving the network performance level with respect to one of the candidate parameter values ​​by applying a preset quantization parameter value to a layer other than the object layer among the plurality of layers and applying one of the candidate parameter values ​​as a quantization parameter of the object layer, Wherein, a network performance level regarding one of the candidate parameter values ​​is derived based on each of the candidate parameter values.

6. The method according to claim 5, wherein: The deriving of a network performance level related to one of the candidate parameter values ​​comprises: calculating a first performance level based on a first reference among various references related to a goal of the neural network; calculating a second performance level based on a second reference among the various references related to the objective of the neural network; and The network performance level is derived by performing a weighted sum operation based on a first weight set with respect to the first performance level and a second weight set with respect to the second performance level.

7. The method according to claim 5, wherein: The network performance level of the neural network includes the accuracy of the neural network.

8. The method according to claim 1, wherein: The quantization parameter includes a fraction length.

9. The method according to claim 1, further comprising: After the quantization parameter of the target layer is updated, determining whether a condition for ending the updating of the quantization parameter is satisfied; as well as The target layer is changed, a candidate parameter set with respect to the changed target layer is formed, the update parameter value is determined, and the quantization parameter is updated based on that a condition for ending the update of the quantization parameter is not satisfied.

10. The method according to claim 9, wherein: The conditions for ending the update of the quantization parameters include at least one of the following: whether the number of object layers on which the update of the quantization parameters is performed or the number of object layers about which the values ​​of the multiple quantization parameters are changed is equal to or greater than a preset value, and whether the network performance level based on the updated parameter values ​​is equal to or higher than a reference value.

11. The method according to claim 9, further comprising: The target layer is changed by setting a previous layer of the target layer as the target layer, based on the condition for ending the updating of the quantization parameter being not satisfied.

12. The method according to claim 1, further comprising: The neural network is generated by setting a quantization parameter for each of the plurality of layers based on a quantization error for the floating point neural network.

13. A device for generating a fixed-point neural network, the device comprising: Memory; as well as a processor configured to execute instructions stored in the memory to generate the fixed-point neural network, select one of the multiple layers of the first fixed-point neural network as the target layer, and generate a second fixed-point neural network by updating a quantization parameter of the target layer based on a network performance of the fixed-point neural network, The processor is further configured to execute instructions stored in the memory to: forming a candidate parameter set including candidate parameter values ​​based on a parameter value preset as a quantization parameter with respect to the object layer; determining a network performance level of a first fixed-point neural network, each of the network performance levels corresponding to a respective one of the candidate parameter values; and The quantization parameter of the target layer is updated based on an update parameter value selected from the candidate parameter values, the update parameter value being selected from the candidate parameter values ​​based on a result of comparing network performance levels.

14. The device according to claim 13, wherein: The processor is further configured to execute instructions stored in the memory to determine a candidate parameter value from among the plurality of candidate parameter values ​​as the updated parameter value, the candidate parameter value corresponding to a highest network performance level.

15. The device according to claim 13, wherein: The processor is further configured to execute instructions stored in the memory to update a quantization parameter for each of more than two layers of the plurality of layers.

16. A method for generating a fixed point neural network of a neural network system, the method comprising: Selecting at least one layer from among a plurality of layers of the first fixed point neural network as a target layer; generating a candidate parameter value based on a parameter value set as a quantization parameter with respect to the object layer; determining a network performance level, each of the network performance levels corresponding to a respective one of the candidate parameter values; as well as The quantization parameter is updated based on a candidate parameter value of a plurality of candidate parameter values, the candidate parameter values ​​corresponding to a highest network performance level.

17. The method according to claim 16, wherein: The first fixed-point neural network includes N sequentially processed layers, wherein the Nth layer from among the N sequentially processed layers is selected as the target layer, and Here, N is an integer equal to or greater than 2.

18. The method according to claim 16, wherein: The determining of the network performance level includes: calculating a plurality of network performance levels with respect to one of the candidate parameter values ​​based on a plurality of evaluation references, and performing weighted sum operations based on the plurality of network performance levels and a plurality of weights set with respect to the plurality of network performance levels, respectively.

19. The method according to claim 16, further comprising: After the updating of the quantization parameter, determining whether the highest network performance level is equal to or higher than a reference value; as well as A layer of the multiple layers other than the object layer is newly set as the object layer, candidate parameter values ​​for the newly set object layer are generated, a network performance level is derived, and the quantization parameter is updated in response to determining that the highest network performance level is not equal to or not higher than a reference value.

Citation Information

Patent Citations

  • Dynamic strategyfixed-point training method and device

    CN107688849A