Neural network construction method and apparatus having average quantization mechanism
Abstract
The present invention discloses a neural network construction method having average quantization mechanism that includes steps outlined below. A weight combination included in each of network layers of a neural network is retrieved. A loss function is generated according to the weight combination of all the network layers and target values. Corresponding to each network layers, a Gini coefficient of the weight combination is calculated and the Gini coefficients corresponding to all the network layers are accumulated as a regularized correction term. The loss function and the regularized correction term are merged as a regularized loss function to perform training on the neural network accordingly to generate a trained weight combination of each of the network layers. A quantization is performed on the trained weight combination of each of the network layers to generate a quantized neural network, in which each of the network layers thereof includes the trained weight combination.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 0 · Forward citations: 1.
Claims (6)
- Claim 1Independent Claim
A neural network construction method having average quantization mechanism, comprising: retrieving a weight combination comprised in each of network layers of a neural network, wherein the weight combination comprises a plurality of floating-point weights; generating a loss function according to the weight combination of all the network layers and a plurality of target values, wherein the loss function is a first function of the weight combination and the target values; corresponding to each of the network layers, calculating a Gini coefficient of the weight combination and accumulating the Gini coefficient of each of the network layers as a regularized correction term, wherein the regularized correction term is a second function of the weight combination; merging the loss function and the regularized correction term to generate a regularized loss function to perform training on the neural network according to the regularized loss function to keep modifying the floating-point weights i
- Claim 2Depends on #1
The neural network construction method of claim 1, further comprising: multiplying the regularized correction term by an order correction parameter such that the regularized correction term and the loss function have the same order.
- Claim 3Depends on #1
The neural network construction method of claim 1, wherein the Gini coefficient has a larger value when a distribution of the weight combination is more uneven and has a smaller value when the distribution of the weight combination is more even.
- Claim 4Independent Claim
A neural network construction apparatus having average quantization mechanism comprising: a storage circuit configured to store a computer executable command; and a processing circuit configured to retrieve and execute the computer executable command to execute a neural network construction method, comprising: retrieving a weight combination comprised in each of network layers of a neural network, wherein the weight combination comprises a plurality of floating-point weights; generating a loss function according to the weight combination of all the network layers and a plurality of target values, wherein the loss function is a first function of the weight combination and the target values; corresponding to each of the network layers, calculating a Gini coefficient of the weight combination and accumulating the Gini coefficient of each of the network layers as a regularized correction term, wherein the regularized correction term is a second function of the weight combination; merging t
- Claim 5Depends on #4
The neural network construction apparatus of claim 4, wherein the neural network construction method further comprising: multiplying the regularized correction term by an order correction parameter such that the regularized correction term and the loss function have the same order.
- Claim 6Depends on #4
The neural network construction apparatus of claim 4, wherein the Gini coefficient has a larger value when a distribution of the weight combination is more uneven and has a smaller value when the distribution of the weight combination is more even.
Technical Overview & Description
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a neural network construction method and a neural network construction apparatus having average quantization mechanism. 2. Description of Related Art Deep learning technology is a branch of machine learning technology that is an algorithm using artificial neural network to learn the characteristic of data. In recent years, under the development of technologies such as big data analytics and artificial intelligence (AI), more and more applications that use embedded systems to implement the deep learning technology are presented. Since floating-point operations is hard for the hardware to perform, the floating-point weights of the neural network need to be quantized to become integers. However, the accuracy of the weights may decrease during the process of quantization such that the accuracy of the whole neural network decreases as well. SUMMARY OF THE INVENTION In consideration of the problem of the prior art, an object of the present invention is to supply a neural network construction method and a neural network construction apparatus having average quantization mechanism. The present invention discloses a neural network construction method having average quantization mechanism that includes steps outlined below. A weight combination included in each of network layers of a neural network is retrieved. A loss function is generated according to the weight combination of all the network layers and a plurality of target values. Corresponding to each of the network layers, a Gini coefficient of the weight combination is calculated and the Gini coefficient of each of the network layers is accumulated as a regularized correction term. The loss function and the regularized correction term are merged to generate a regularized loss function to perform training on the neural network according to the regularized loss function, so as to generate a trained weight combination of each of the net
Cited By — Indexed Forward Citations (1 of 1 total)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 12,634,116 B2 | Inference and conversion method for encrypted deep neural network model | 2026 | 0 |
References Cited — Backward Prior Art (0)
No backward patent references recorded.
Non-Patent Literature (10)
- Guest, Olivia.
- “
- Using the Gini coefficient to evaluate deep neural network layer representations.
- ”
- Blog post.
- <
- Neuroplausible.com/gini
- >
- (2017). (Year: 2017).
- Long, Xin, et al.