# US 2021/0279586 A1 · Method and apparatus for clipping neural networks and performing convolution

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

- Number: US 2021/0279586 A1
- Document ID: US20210279586A1
- Status: Published application
- Kind: A1
- Application number: 17/190,642
- Filed: 2021-03-03
- Published: 2021-09-09
- Earliest claimed: 2020-03-03
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: CongCong HE; Jian ZHAO; Min YANG; Peng LEI
- Web page: https://patentgrep.com/patent/US20210279586A1

## CPC

- G06V 10/454: {Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]}
- G06F 18/211: Selection of the most significant subset of features
- G06F 18/213: Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F 18/22: Matching criteria, e.g. proximity measures
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06V 10/764: using classification, e.g. of video objects
- G06V 10/82: using neural networks
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Methods and apparatuses of clipping a neural network and calculating a convolution of a neural network are provided. A method of clipping a neural network includes selecting a kernel slice of an input channel of a convolution layer in the neural network based on a convolution parameter of the convolution layer, determining a kernel slice similar to the selected kernel slice, determining a substitute slice for the selected kernel slice, based on the similar kernel slice, and clipping the selected kernel slice and replacing the clipped kernel slice by the substitute slice. The convolution parameter may include a number of input channels of the convolution layer, a number of output channels, and a width and a height of a filter of a convolution kernel of the convolution layer.

## Claims

### Claim 1

A processor-implemented method of clipping a neural network, the method comprising:
selecting a kernel slice of an input channel of a convolution layer in the neural network based on a convolution parameter of the convolution layer;
determining a kernel slice similar to the selected kernel slice;
determining a substitute slice for the selected kernel slice, based on the similar kernel slice; and
clipping the selected kernel slice and replacing the clipped kernel slice by the substitute slice,
wherein the convolution parameter comprises a number of input channels of the convolution layer, a number of output channels, and a width and a height of a filter of a convolution kernel of the convolution layer.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
storing an index of the clipped kernel slice.

### Claim 3 (depends on 1)

The method of claim 1, wherein the determining of the similar kernel slice comprises:
calculating norms of kernel slices for each of the input channels of the convolution layer; and
determining a kernel slice similar to the selected kernel slice, based on the norms.

### Claim 4 (depends on 3)

The method of claim 3, wherein the determining of the kernel slice similar to the selected kernel slice comprises:
classifying kernel slices of the input channels into at least one class based on the norms; and
determining a kernel slice from among kernel slices within a class of the selected kernel slice based on a similarity between the selected kernel slice and each of the kernel slices within the class.

### Claim 5 (depends on 4)

The method of claim 4, wherein the determining of the kernel slice based on the similarity comprises:
determining the similarity by calculating a norm of a difference between the selected kernel slice and each of the kernel slices within the class; and
determining a kernel slice having a similarity to the selected kernel slice lesser than or equal to a threshold, as the similar kernel slice.

### Claim 6 (depends on 1)

The method of claim 1, wherein the determining of the substitute slice comprises:
calculating an average kernel slice by averaging the selected kernel slice and the similar kernel slice; and
replacing any one or any combination of the selected kernel slice and the similar kernel slice by the average kernel slice.

### Claim 7 (depends on 1)

The method of claim 1, wherein the selecting of the kernel slice comprises:
determining a number of kernel slices based on the number of input channels; and
extracting the kernel slice of the input channel from a tensor representing the convolution kernel based on the number of kernel slices and the convolution parameter.

### Claim 8 (depends on 1)

A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the method of claim 1.

### Claim 9

A processor-implemented method of convolution of a neural network, the method comprising:
determining whether a kernel slice of each input channel is a substitute slice, based on index information of a convolution layer included in the neural network;
obtaining an index of the substitute slice from the index information, in response to the kernel slice being the substitute slice; and
calculating a convolution based on the index of the substitute slice,
wherein a first kernel slice, similar to a second kernel slice, selected based on a convolution parameter of the convolution layer is clipped and replaced by the substitute slice.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
performing a convolution on the kernel slice using an index of the kernel slice, in response to the kernel slice not being the substitute slice.

### Claim 11 (depends on 10)

The method of claim 10, further comprising:
outputting a cumulative value obtained by accumulating results of the calculating of the convolution and the performing of the convolution for kernel slices of input channels of the convolution layer as an output of the convolution layer.

### Claim 12

An electronic apparatus comprising:
a processor configured to:
select a kernel slice of an input channel of a convolution layer in a neural network based on a convolution parameter of the convolution layer;
determine a kernel slice similar to the selected kernel slice;
determine a substitute slice for the selected kernel slice, based on the similar kernel slice; and
clip the selected kernel slice and replace the clipped kernel slice by the substitute slice,
wherein the convolution parameter comprises a number of input channels of the convolution layer, a number of output channels, and a width and a height of a filter of a convolution kernel of the convolution layer.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the processor is further configured to:
classify kernel slices of the input channels into one or more classes based on the norms of kernel slices for each of the input channels of the convolution layer; and
determine a kernel slice, from among kernel slices within a class of the selected kernel slice, to be the similar kernel slice based on a similarity between the selected kernel slice and each of the kernel slices within the class.
