IP Library Granted Patent US 11,671,110
Granted Patent B2
US 11,671,110 · App. 17/081,642 · Granted Jun 6, 2023

Method and apparatus for neural network model compression/decompression

Inventors: Wei Wang (Palo Alto, CA); Wei Jiang (San Jose, CA); Shan Liu (San Jose, CA)
Assignee: Tencent America LLC
H03M7/3064G06N3/02H03M7/6005H04N19/11H04N19/13
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,671,110
App. No.
17/081,642
Granted
Jun 6, 2023
Kind
B2
Abstract

Aspects of the disclosure provide methods and apparatuses for neural network model compression/decompression. In some examples, an apparatus for neural network model decompression includes receiving circuitry and processing circuitry. The processing circuitry decodes, from a bitstream corresponding to a representation of a neural network, at least a syntax element to be applied to multiple blocks in the neural network. Then, the processing circuitry reconstructs, from the bitstream, weight coefficients in the blocks based on the syntax element.

Claims (69)

1. A method for neural network decoding in a decoder, comprising:

decoding, from a neural network representation (NNR) header of a bitstream, an index that is indicative of a coding tree unit (CTU) size associated with the neural network;

partitioning a weight tensor associated with a layer of the neural network into CTUs based on the CTU size that is indicated by the index, each of the CTUs including one or multiple blocks in the layer of the neural network;

decoding, by a processor and from the bitstream, at least a syntax element to be applied to the multiple blocks in the layer of the neural network; and

reconstructing, by the processor and from the bitstream, weight coefficients of the multiple blocks based on the syntax element.

2. The method of claim 1 , further comprising:

decoding, from the NNR header, a flag that indicates whether to change the CTU size based on a kernel size;

updating the CTU size based on the kernel size in response to changing the CTU size based on the kernel size being indicated as enabled by the flag;

partitioning the weight tensor into the CTUs based on the updated CTU size; and

reconstructing, from the bitstream, the weight coefficients of the CTUs.

3. The method of claim 1 , further comprising:

decoding, from the bitstream, one or more split flags indicative of partitions in a CTU of the CTUs; and

partitioning the CTU into coding units (CUs) based on the one or more split flags.

4. The method of claim 1 , further comprising:

determining, based on at least the syntax element, a bit depth for quantized weight coefficients in the layer;

allocating a memory space for the quantized weight coefficients based on the bit depth; and

decoding, from the bitstream, the quantized weight coefficients in the layer using the allocated memory space.

5. The method of claim 4 , further comprising:

decoding, from the NNR header, a global bit depth;

decoding, from a layer header for the layer, a difference of the bit depth from the global bit depth; and

determining the bit depth for the quantized weight coefficients in the layer based on a combination of the global bit depth and the difference of the bit depth from the global bit depth.

6. The method of claim 1 , further comprising:

decoding, from a layer header, a flag indicative of a scan order of the multiple blocks in the layer; and

decoding the multiple blocks from the bitstream according to the scan order.

7. The method of claim 1 , further comprising:

decoding, from a layer header, at least one of a number of dimensions in the layer, a shape of the layer, a scan order of coding units in the layer, a saturated maximum value in the layer, or a quantization step size in the layer.

8. The method of claim 1 , further comprising:

decoding, from the bitstream, a bias sublayer of the layer before decoding another sublayer of the layer in response to the layer including the bias sublayer and the other sublayer.

9. The method of claim 1 , further comprising:

decoding a parameter from a header portion in the bitstream, the parameter being indicative of a total size of the header portion; and

accessing a portion behind the header portion in the bitstream based on the parameter.

10. The method of claim 1 , wherein the reconstructing the weight coefficients further comprises:

decoding quantized weight coefficients in the layer; and

reconstructing the weight coefficients based on the decoded quantized weight coefficients and a step size indicated by the decoded syntax element.

11. An apparatus for neural network decoding, comprising:

processing circuitry configured to:

decode, from a neural network representation (NNR) header of a bitstream, an index that is indicative of a coding tree unit (CTU) size associated with the neural network;

partition a weight tensor associated with a layer of the neural network into CTUs based on the CTU size that is indicated by the index, each of the CTUs including one or multiple blocks in the layer of the neural network;

decode, by a processor and from the bitstream, at least a syntax element to be applied to the multiple blocks in the layer of the neural network; and

reconstruct, by the processor and from the bitstream, weight coefficients of the multiple blocks based on the syntax element.

12. The apparatus of claim 11 , wherein the processing circuitry is configured to:

decode, from the NNR header, a flag that indicates whether to change the CTU size based on a kernel size;

update the CTU size based on the kernel size in response to changing the CTU size based on the kernel size being indicated as enabled by the flag;

partition the weight tensor into the CTUs based on the updated CTU size; and

reconstruct, from the bitstream, the weight coefficients of the CTUs.

13. The apparatus of claim 11 , wherein the processing circuitry is configured to:

decode, from the bitstream, one or more split flags indicative of partitions in a CTU of the CTUs; and

partition the CTU into coding units (CUs) based on the one or more split flags.

14. The apparatus of claim 11 , wherein the processing circuitry is configured to:

determine, based on at least the syntax element, a bit depth for quantized weight coefficients in the layer;

allocate a memory space for the quantized weight coefficients based on the bit depth; and

decode, from the bitstream, the quantized weight coefficients in the layer using the allocated memory space.

15. The apparatus of claim 14 , wherein the processing circuitry is configured to:

decode, from the NNR header, a global bit depth;

decode, from a layer header for the layer, a difference of the bit depth from the global bit depth; and

determine the bit depth for the quantized weight coefficients in the layer based on a combination of the global bit depth and the difference of the bit depth from the global bit depth.

16. The apparatus of claim 11 , wherein the processing circuitry is configured to:

decode, from a layer header, a flag indicative of a scan order of the multiple blocks in the layer; and

decode the multiple blocks from the bitstream according to the scan order.

17. The apparatus of claim 11 , wherein the processing circuitry is configured to:

decode, from a layer header, at least one of a number of dimensions in the layer, a shape of the layer, a scan order of coding units in the layer, a saturated maximum value in the layer, or a quantization step size in the layer.

18. The apparatus of claim 11 , wherein the processing circuitry is configured to:

decode, from the bitstream, a bias sublayer of the layer before decoding another sublayer of the layer in response to the layer including the bias sublayer and the other sublayer.

19. The apparatus of claim 11 , wherein the processing circuitry is configured to:

decode a parameter from a header portion in the bitstream, the parameter being indicative of a total size of the header portion; and

access a portion behind the header portion in the bitstream based on the parameter.

20. The apparatus of claim 11 , wherein the processing circuitry is configured to:

decode quantized weight coefficient in the layer; and

reconstruct the weight coefficients based on the quantized weight coefficient that is decoded and a step size indicated by the decoded at least the syntax element.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 29, 2020
From: WANG, WEI; JIANG, WEI; LIU, SHAN
To: TENCENT AMERICA LLC
Reel/Frame 054207/0295 →
Continuity (4)
Provisional Application 62958697 · Jan 8, 2020
Provisional Application 62939057 · Nov 22, 2019
Provisional Application 62939054 · Nov 22, 2019
Related Publication 20210159912A1 · May 27, 2021