US12393828B2ActiveUtilityA1
Method and apparatus for neural network quantization
Est. expiryJan 9, 2039(~12.5 yrs left)· nominal 20-yr term from priority
G06N 3/09G06N 3/0495G06N 3/0464G06N 3/0442G06N 3/047G06N 3/084G06N 3/0499G06N 3/045G06N 3/063
80
PatentIndex Score
0
Cited by
28
References
16
Claims
Abstract
According to a method and apparatus for neural network quantization, a quantized neural network is generated by performing learning of a neural network, obtaining weight differences between an initial weight and an updated weight determined by the learning of each cycle for each of layers in the first neural network, analyzing a statistic of the weight differences for each of the layers, determining one or more layers, from among the layers, to be quantized with a lower-bit precision based on the analyzed statistic, and generating a second neural network by quantizing the determined one or more layers with the lower-bit precision.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method for neural network quantization on a neural network including a plurality of layers, the method comprising:
performing a learning on each layer of a neural network to obtain a learned weight;
obtaining, for each layer, a statistic of weight differences between an initial weight of the neural network and the learned weight;
prioritizing layers of the neural network based on a size of the statistic of the weight differences of the layers; and
performing a quantization of the neural network with a lower-bit precision to one or more layers having a lower statistic from among the prioritized layers.
2. The method of claim 1 , wherein the statistic comprises performing a mean square of the weight differences for each layer.
3. The method of claim 1 , further comprising determining the one or more layers having the lower statistic based on an accuracy loss by the quantization.
4. The method of claim 3 , wherein the determining of the one or more layers comprises determining the one or more layers such that the accuracy loss of a quantized neural network in which the one or more layers are quantized with the lower-bit precision is equal or within a threshold in comparison with the neural network in which the one or more layers are not quantized with the lower-bit precision.
5. The method of claim 3 , wherein the accuracy loss comprises a recognition rate of the neural network.
6. The method of claim 3 , wherein the determining of the one or more layers comprises selecting to not determine a layer having a smallest statistic size from among the layers of the neural network.
7. The method of claim 1 , wherein a neural network generated by performing the quantization of the neural network comprises the one or more layers corresponding to the lower-bit precision and the remaining layers corresponding to a bit precision being greater than the lower-bit precision.
8. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the method defined in claim 1 .
9. An apparatus for neural network quantization on a neural network including a plurality of layers, the apparatus comprising:
a processor configured to:
performing a learning on each layer of a neural network to obtain a learned weight;
obtaining, for each layer, a statistic of weight differences between an initial weight of the neural network and the learned weight;
prioritizing layers of the neural network based on a size of the statistic of the weight differences of the layers; and
performing a quantization of the neural network with a lower-bit precision to one or more layers having a lower statistic from among the prioritized layers.
10. The apparatus of claim 9 , wherein the statistic comprises performing a mean square of the weight differences for each layer.
11. The apparatus of claim 9 , wherein the processor is further configured to determine the one or more layers having the lower statistic based on an accuracy loss by the quantization.
12. The apparatus of claim 11 , wherein the processor is further configured to determine the one or more layers such that the accuracy loss of a quantized neural network in which the one or more layers are quantized with the lower-bit precision is equal or within a threshold in comparison with the neural network in which the one or more layers are not quantized with the lower-bit precision.
13. The apparatus of claim 11 , wherein the accuracy loss comprises a recognition rate of the neural network.
14. The apparatus of claim 11 , wherein the processor is further configured to not determine a layer having a smallest statistic size from among the layers of the neural network.
15. The apparatus of claim 9 , wherein a neural network generated by performing the quantization of the neural network comprises the one or more layers corresponding to the lower-bit precision and the remaining layers corresponding to a bit precision being greater than the lower-bit precision.
16. The apparatus of claim 9 , further comprising a memory storing instructions that, when executed, configures the processor to perform the learning, obtain the statistic, prioritize the layers, and perform the quantization.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.