# US 2023/0409886 A1 · Method and apparatus for performing deconvolution processing on feature data by using convolution hardware

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

- Number: US 2023/0409886 A1
- Document ID: US20230409886A1
- Status: Published application
- Kind: A1
- Application number: 18/247,408
- Filed: 2022-02-10
- Published: 2023-12-21
- Earliest claimed: 2021-03-18
- Assignees: Beijing Horizon Robotics Technology Research and Development Co., Ltd.
- Applicants: Beijing Horizon Robotics Technology Research and Development Co., Ltd.
- Inventors: Zhuoran ZHAO; Kai YU; Chang HUANG; Zhenjiang WANG; Jianjun LI; Delin LI; Yinan ZHANG
- Web page: https://patentgrep.com/patent/US20230409886A1

## CPC

- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/063: using electronic means
- G06F 17/153: {Multidimensional correlation or convolution}
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure provides a method and apparatus for deconvolving feature data using convolution hardware. The method includes: reading a feature map and deconvolution kernel into on-chip memory, and padding zeroes to the feature map; determining convolution kernels based on the deconvolution kernel; removing a row and/or column of each convolution kernel whose elements all are invalid weights, to obtain an optimized convolution kernel, and removing a corresponding row and/or column in the zero-padded feature map to obtain an corresponding optimized feature map; convolving each optimized convolution kernel with corresponding optimized feature map using the multiply-add array, to obtain convolutional outputs; and interleaving and synthesizing the convolutional outputs to obtain an interleaving synthetic output including at least a deconvolutional output corresponding to the feature map and deconvolution kernel. The method reduces hardware complexity, chip area and power consumption, and many invalid operations, improving operating efficiency of convolution hardware.

## Claims

### Claim 1

A method for performing deconvolution processing on a feature map by using dedicated convolution hardware, the dedicated convolution hardware comprising a multiply-add array and an on-chip memory, and the method comprising:
reading the feature map and a deconvolution kernel into the on-chip memory, and performing zero-padding processing on the feature map;
determining a plurality of convolution kernels based on the deconvolution kernel;
removing a row and/or column of each convolution kernel in which all elements are invalid weights to obtain an optimized convolution kernel, and removing a corresponding row and/or column in a zero-padded feature map to obtain an optimized feature map corresponding to each optimized convolution kernel;
performing convolution processing on each optimized convolution kernel and the corresponding optimized feature map by using the multiply-add array, to obtain a plurality of convolutional outputs; and
performing interleaving synthesis processing on the plurality of convolutional outputs, to obtain an interleaving synthetic output, wherein the interleaving synthetic output comprises a deconvolutional output corresponding to the feature map and the deconvolution kernel.

### Claim 2 (depends on 1)

The method according to claim 1, wherein a quantity of multipliers comprised in the multiply-add array is larger than or equal to a quantity of weight values comprised in each optimized convolution kernel.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the performing zero-padding processing on the feature map comprises:
determining an upper-side quantity for zero padding and a lower-side quantity for zero padding of the feature map based on a height size of the deconvolution kernel and a stride in a height direction and a zero-padding parameter in the height direction that are used for deconvolution operation, wherein the lower-side quantity for zero padding is one more row than the upper-side quantity for zero padding; and
determining a left-side quantity for zero padding and a right-side quantity for zero padding of the feature map based on a width size of the deconvolution kernel and a stride in a width direction and a zero-padding parameter in the width direction that are used for deconvolution operation, wherein the right-side quantity for zero padding is one more column than the left-side quantity for zero padding.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the determining a plurality of convolution kernels based on the deconvolution kernel comprises:
determining a quantity and sizes of convolution kernels corresponding to the deconvolution kernel, wherein the quantity of the convolution kernels is equal to a product of a stride in a height direction and a stride in a width direction that are used for deconvolution operation, a height size of the convolution kernel is a function of a height size of the deconvolution kernel and the stride in the height direction and a zero-padding parameter in the height direction that are used for deconvolution operation, and a width size of the convolution kernel is a function of a width size of the deconvolution kernel and the stride in the width direction and a zero-padding parameter in the width direction that are used for deconvolution operation; and
for each position in each convolution kernel, determining two-dimensional coordinate values of a corresponding position in the deconvolution kernel based on two-dimensional indexes in the height direction and the width direction of the convolution kernel, the height size and the width size of the convolution kernel, two-dimensional coordinate values of the position, and the stride in the height direction, the stride in the width direction, the zero-padding parameter in the height direction, and the zero-padding parameter in the width direction that are used for deconvolution operation, and taking a weight value of the corresponding position as a weight value of the position in the convolution kernel,
wherein when the determined two-dimensional coordinate values of the corresponding position in the deconvolution kernel exceeds a range of a position coordinate in the deconvolution kernel, a weight in the position of the convolution kernel is determined as a zero-valued invalid weight.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the performing interleaving synthesis processing on the plurality of convolutional outputs comprises:
padding all elements in each convolutional output into a synthetic matrix by taking the stride in the height direction and the stride in the width direction that are used for deconvolution operation as padding strides, and taking the two-dimensional indexes in the height direction and the width direction of the convolution kernel as padding offsets.

### Claim 6 (depends on 1)

The method according to claim 1, wherein after the performing interleaving synthesis processing on the plurality of convolutional outputs, to obtain an interleaving synthetic output, the method further comprises:
ailoring the interleaving synthetic output, to obtain the deconvolutional output corresponding to the feature map and the deconvolution kernel.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the tailoring the interleaving synthetic output comprises:
tailoring right and lower sides of the interleaving synthetic output, until a size of the interleaving synthetic output after tailoring corresponds to a size of the deconvolutional output corresponding to the feature map and the deconvolution kernel.

### Claim 8

(canceled)

### Claim 9

An electronic device, comprising:
a dedicated convolution hardware, comprising a multiply-add array and an on-chip memory;
at least one off-chip memory, storing instructions; and
at least one processor,
wherein, when the instructions are run by the processor, the electronic device is enabled to implement a method for performing deconvolution processing on a feature map, and the method comprising:
reading the feature map and a deconvolution kernel into the on-chip memory, and performing zero-padding processing on the feature map;
determining a plurality of convolution kernels based on the deconvolution kernel;
removing a row and/or column of each convolution kernel in which all elements are invalid weights to obtain an optimized convolution kernel, and removing a corresponding row and/or column in a zero-padded feature map to obtain an optimized feature map corresponding to each optimized convolution kernel;
performing convolution processing on each optimized convolution kernel and the corresponding optimized feature map by using the multiply-add array, to obtain a plurality of convolutional outputs; and
performing interleaving synthesis processing on the plurality of convolutional outputs, to obtain an interleaving synthetic output, wherein the interleaving synthetic output comprises a deconvolutional output corresponding to the feature map and the deconvolution kernel.

### Claim 10

A computer readable storage medium, storing computer program instructions, wherein
when the computer program instructions are run by an electronic device, the electronic device is enabled to implement a method for performing deconvolution processing on a feature map; and
the electronic device further comprises dedicated convolution hardware, the dedicated convolution hardware comprising a multiply-add array and an on-chip memory,
wherein the method comprises:
reading the feature map and a deconvolution kernel into the on-chip memory, and performing zero-padding processing on the feature map;
determining a plurality of convolution kernels based on the deconvolution kernel;
removing a row and/or column of each convolution kernel in which all elements are invalid weights to obtain an optimized convolution kernel, and removing a corresponding row and/or column in a zero-padded feature map to obtain an optimized feature map corresponding to each optimized convolution kernel;
performing convolution processing on each optimized convolution kernel and the corresponding optimized feature map by using the multiply-add array, to obtain a plurality of convolutional outputs; and
performing interleaving synthesis processing on the plurality of convolutional outputs, to obtain an interleaving synthetic output, wherein the interleaving synthetic output comprises a deconvolutional output corresponding to the feature map and the deconvolution kernel.

### Claim 11 (depends on 9)

The electronic device according to claim 9, wherein a quantity of multipliers comprised in the multiply-add array is larger than or equal to a quantity of weight values comprised in each optimized convolution kernel.

### Claim 12 (depends on 9)

The electronic device according to claim 9, wherein the performing zero-padding processing on the feature map comprises:
determining an upper-side quantity for zero padding and a lower-side quantity for zero padding of the feature map based on a height size of the deconvolution kernel and a stride in a height direction and a zero-padding parameter in the height direction that are used for deconvolution operation, wherein the lower-side quantity for zero padding is one more row than the upper-side quantity for zero padding; and
determining a left-side quantity for zero padding and a right-side quantity for zero padding of the feature map based on a width size of the deconvolution kernel and a stride in a width direction and a zero-padding parameter in the width direction that are used for deconvolution operation, wherein the right-side quantity for zero padding is one more column than the left-side quantity for zero padding.

### Claim 13 (depends on 9)

The electronic device according to claim 9, wherein the determining a plurality of convolution kernels based on the deconvolution kernel comprises:
determining a quantity and sizes of convolution kernels corresponding to the deconvolution kernel, wherein the quantity of the convolution kernels is equal to a product of a stride in a height direction and a stride in a width direction that are used for deconvolution operation, a height size of the convolution kernel is a function of a height size of the deconvolution kernel and the stride in the height direction and a zero-padding parameter in the height direction that are used for deconvolution operation, and a width size of the convolution kernel is a function of a width size of the deconvolution kernel and the stride in the width direction and a zero-padding parameter in the width direction that are used for deconvolution operation; and
for each position in each convolution kernel, determining two-dimensional coordinate values of a corresponding position in the deconvolution kernel based on two-dimensional indexes in the height direction and the width direction of the convolution kernel, the height size and the width size of the convolution kernel, two-dimensional coordinate values of the position, and the stride in the height direction, the stride in the width direction, the zero-padding parameter in the height direction, and the zero-padding parameter in the width direction that are used for deconvolution operation, and taking a weight value of the corresponding position as a weight value of the position in the convolution kernel,
wherein when the determined two-dimensional coordinate values of the corresponding position in the deconvolution kernel exceeds a range of a position coordinate in the deconvolution kernel, a weight in the position of the convolution kernel is determined as a zero-valued invalid weight.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein the performing interleaving synthesis processing on the plurality of convolutional outputs comprises:
padding all elements in each convolutional output into a synthetic matrix by taking the stride in the height direction and the stride in the width direction that are used for deconvolution operation as padding strides, and taking the two-dimensional indexes in the height direction and the width direction of the convolution kernel as padding offsets.

### Claim 15 (depends on 9)

The electronic device according to claim 9, wherein after the performing interleaving synthesis processing on the plurality of convolutional outputs, to obtain an interleaving synthetic output, the method further comprises:
tailoring the interleaving synthetic output, to obtain the deconvolutional output corresponding to the feature map and the deconvolution kernel.

### Claim 16 (depends on 15)

The electronic device according to claim 15, wherein the tailoring the interleaving synthetic output comprises:
tailoring right and lower sides of the interleaving synthetic output, until a size of the interleaving synthetic output after tailoring corresponds to a size of the deconvolutional output corresponding to the feature map and the deconvolution kernel.

### Claim 17 (depends on 10)

The computer readable storage medium according to claim 10, wherein a quantity of multipliers comprised in the multiply-add array is larger than or equal to a quantity of weight values comprised in each optimized convolution kernel,
or,
wherein the performing zero-padding processing on the feature map comprises:
determining an upper-side quantity for zero padding and a lower-side quantity for zero padding of the feature map based on a height size of the deconvolution kernel and a stride in a height direction and a zero-padding parameter in the height direction that are used for deconvolution operation, wherein the lower-side quantity for zero padding is one more row than the upper-side quantity for zero padding; and
determining a left-side quantity for zero padding and a right-side quantity for zero padding of the feature map based on a width size of the deconvolution kernel and a stride in a width direction and a zero-padding parameter in the width direction that are used for deconvolution operation, wherein the right-side quantity for zero padding is one more column than the left-side quantity for zero padding.

### Claim 18 (depends on 10)

The computer readable storage medium according to claim 10, wherein the determining a plurality of convolution kernels based on the deconvolution kernel comprises:
determining a quantity and sizes of convolution kernels corresponding to the deconvolution kernel, wherein the quantity of the convolution kernels is equal to a product of a stride in a height direction and a stride in a width direction that are used for deconvolution operation, a height size of the convolution kernel is a function of a height size of the deconvolution kernel and the stride in the height direction and a zero-padding parameter in the height direction that are used for deconvolution operation, and a width size of the convolution kernel is a function of a width size of the deconvolution kernel and the stride in the width direction and a zero-padding parameter in the width direction that are used for deconvolution operation; and
for each position in each convolution kernel, determining two-dimensional coordinate values of a corresponding position in the deconvolution kernel based on two-dimensional indexes in the height direction and the width direction of the convolution kernel, the height size and the width size of the convolution kernel, two-dimensional coordinate values of the position, and the stride in the height direction, the stride in the width direction, the zero-padding parameter in the height direction, and the zero-padding parameter in the width direction that are used for deconvolution operation, and taking a weight value of the corresponding position as a weight value of the position in the convolution kernel,
wherein when the determined two-dimensional coordinate values of the corresponding position in the deconvolution kernel exceeds a range of a position coordinate in the deconvolution kernel, a weight in the position of the convolution kernel is determined as a zero-valued invalid weight.

### Claim 19 (depends on 18)

The computer readable storage medium according to claim 18, wherein the performing interleaving synthesis processing on the plurality of convolutional outputs comprises:
padding all elements in each convolutional output into a synthetic matrix by taking the stride in the height direction and the stride in the width direction that are used for deconvolution operation as padding strides, and taking the two-dimensional indexes in the height direction and the width direction of the convolution kernel as padding offsets.

### Claim 20 (depends on 10)

The computer readable storage medium according to claim 10, wherein after the performing interleaving synthesis processing on the plurality of convolutional outputs, to obtain an interleaving synthetic output, the method further comprises:
tailoring the interleaving synthetic output, to obtain the deconvolutional output corresponding to the feature map and the deconvolution kernel.

### Claim 21 (depends on 20)

The computer readable storage medium according to claim 20, wherein the tailoring the interleaving synthetic output comprises:
tailoring right and lower sides of the interleaving synthetic output, until a size of the interleaving synthetic output after tailoring corresponds to a size of the deconvolutional output corresponding to the feature map and the deconvolution kernel.
