# US 2021/0334622 A1 · Method, apparatus and storage medium for generating and applying multilayer neural network

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0334622 A1
- Document ID: US20210334622A1
- Status: Published application
- Kind: A1
- Application number: 17/230,577
- Filed: 2021-04-14
- Published: 2021-10-28
- Earliest claimed: 2020-04-20
- Assignees: Canon Kabushiki Kaisha
- Applicants: Canon Kabushiki Kaisha
- Inventors: Wei Tao; Tsewei Chen; Dongchao Wen; Junjie Liu; Deyu Wang
- Web page: https://patentgrep.com/patent/US20210334622A1

## CPC

- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/063: using electronic means
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/08: Learning methods
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method for generating a multilayer neural network including acquiring a multilayer neural network, wherein the multilayer neural network includes at least convolutional layers and quantization layers; generating, for each of the quantization layers in the multilayer neural network, quantization threshold parameters based on a quantization bit parameter and a learnable quantization interval parameter in the quantization layer; and updating the multilayer neural network to obtain a fixed-point neural network based on the generated quantization threshold parameters and operation parameters for each layer in the multilayer neural network.

## Claims

### Claim 1

A method for generating a multilayer neural network comprising:
acquiring a multilayer neural network, wherein the multilayer neural network includes at least convolutional layers and quantization layers;
generating, for each of the quantization layers in the multilayer neural network, quantization threshold parameters based on a quantization bit parameter and a learnable quantization interval parameter in the quantization layer; and
updating the multilayer neural network to obtain a fixed-point neural network based on the generated quantization threshold parameters and operation parameters for each layer in the multilayer neural network.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the generating of the quantization threshold parameters comprises:
determining a quantization step size based on the quantization bit parameter and the learnable quantization interval parameter;
determining quantization centers based on the learnable quantization interval parameter and the determined quantization step size; and
determining the quantization threshold parameters based on the determined quantization centers;
wherein the quantization bit parameter is determined based on the number of bits required to quantize a feature map.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the quantization step size is a quotient between a length indicated by the learnable quantization interval parameter and the number of different output states indicated by the quantization bit parameter.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the quantization centers are endpoint values of individual sub-intervals, wherein the sub-intervals are obtained by dividing an interval indicated by the learnable quantization interval parameter based on the quantization step size.

### Claim 5 (depends on 2)

The method according to claim 2, wherein the quantization threshold parameters are composed of values each of which is an average value of values of two adjacent quantization centers, or are composed of a value of the first quantization center and values each of which is an average value of values of two adjacent quantization centers among remaining quantization centers.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the updating of the multilayer neural network comprises:
dividing at least one sub-structure from the multilayer neural network, wherein bottom layers of divided sub-structures are quantization layers;
transferring, for each of the divided sub-structures, the operation parameters for layers other than the quantization layer to the quantization layer, and updating the generated quantization threshold parameters in the quantization layer based on the transferred operation parameters; and
performing a fixed-point processing on each layer in the multilayer neural network, thereby converting floating-point operation parameters into fixed-point parameters.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the divided sub-structures include convolutional layers.

### Claim 8 (depends on 7)

The method according to claim 7, wherein in the transferring,
the generated quantization threshold parameters in the quantization layer are updated based on a normalization coefficient transferred to the quantization layer.

### Claim 9 (depends on 7)

The method according to claim 7, wherein in the transferring,
the generated quantization threshold parameters in the quantization layer are updated based on a scale coefficient transferred from the convolutional layer to the quantization layer.

### Claim 10 (depends on 6)

The method according to claim 6, wherein the updated quantization threshold parameters are expressed by a base coefficient, a normalization coefficient, and association relationships between the generated quantization threshold parameters with respect to the base coefficient.

### Claim 11 (depends on 6)

The method according to claim 6, wherein the updating of the generated quantization threshold parameters further comprises:
removing layers for which the operation parameters have been completely transferred to the quantization layers from the sub-structures.

### Claim 12

An apparatus for generating a multilayer neural network comprising:
an acquisition unit configured to acquire a multilayer neural network, wherein the multilayer neural network includes at least convolutional layers and quantization layers;
a generation unit configured to, for each of the quantization layers in the multilayer neural network, generate quantization threshold parameters based on a quantization bit parameter and a learnable quantization interval parameter in the quantization layer; and
an updating unit configured to update the multilayer neural network to obtain a fixed-point neural network based on the generated quantization threshold parameters and operation parameters for each layer in the multilayer neural network.

### Claim 13

A method for applying a multilayer neural network comprising:
saving a loaded multilayer neural network;
inputting a data set corresponding to requirements for a task that the saved multilayer neural network can perform to the saved multilayer neural network; and
performing a convolution operation and a quantization operation on the data set in the multilayer neural network from top to bottom and outputting a result.

### Claim 14 (depends on 13)

The method according to claim 13, wherein the loaded multilayer neural network is generated by a method comprising:
acquiring a multilayer neural network, wherein the multilayer neural network includes at least convolutional layers and quantization layers;
generating, for each of the quantization layers in the multilayer neural network, quantization threshold parameters based on a quantization bit parameter and a learnable quantization interval parameter in the quantization layer; and
updating the multilayer neural network to obtain a fixed-point neural network based on the generated quantization threshold parameters and operation parameters for each layer in the multilayer neural network.

### Claim 15 (depends on 13)

The method according to claim 13, wherein the quantization operation comprises:
dividing a numerical space into individual sub-intervals based on quantization threshold parameters in a quantization layer in the multilayer neural network, wherein each sub-interval corresponds to a quantized output value; and
determining the sub-interval to which a result of the convolution operation belongs, and outputting the quantized output value corresponding to the sub-interval.

### Claim 16

An apparatus for generating a multilayer neural network comprising:
a saving unit configured to save a loaded multilayer neural network;
an input unit configured to input a data set corresponding to requirements for a task that the saved multilayer neural network can perform to the saved multilayer neural network; and
an operation unit configured to perform a convolution operation and a quantization operation on the data set in the multilayer neural network from top to bottom and outputting a result.

### Claim 17

A non-transitory computer-readable storage medium for storing instructions, which when executed by a processor, enable to generate a multilayer neural network, the instructions comprise:
an acquisition step of acquiring a multilayer neural network, wherein the multilayer neural network includes at least convolutional layers and quantization layers;
a generation step of, for each of the quantization layers in the multilayer neural network, generating quantization threshold parameters based on a quantization bit parameter and a learnable quantization interval parameter in the quantization layer; and
an updating step of updating the multilayer neural network to obtain a fixed-point neural network based on the generated quantization threshold parameters and operation parameters for each layer in the multilayer neural network.

### Claim 18

A non-transitory computer-readable storage medium for storing instructions, which when executed by a processor, enable to apply a multilayer neural network, the instructions comprise:
a saving step of saving a multilayer neural network;
an inputting step of inputting a data set corresponding to requirements for a task that the saved multilayer neural network can perform to the saved multilayer neural network; and
an operating step of performing a convolution operation and a quantization operation on the data set in the multilayer neural network from top to bottom and output a result.
