# US 2019/0095790 A1 · Method and apparatus for adapting parameters of neural network

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

- Number: US 2019/0095790 A1
- Document ID: US20190095790A1
- Status: Published application
- Kind: A1
- Application number: 15/960,119
- Filed: 2018-04-23
- Published: 2019-03-28
- Earliest claimed: 2017-09-25
- Assignees: Nanjing Horizon Robotics Technology Co., Ltd.
- Applicants: Nanjing Horizon Robotics Technology Co., Ltd.
- Inventors: Kun LING; Liang CHEN; Jianjun LI; Delin LI; Chang HUANG
- Web page: https://patentgrep.com/patent/US20190095790A1

## CPC

- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/063: using electronic means
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Disclosed are a method and an apparatus for adapting parameters of a neural network. The method includes selecting one or more dimensions for a weight parameter of each of at least one layer of the neural network, determining a dimension value and a corresponding target value in each dimension of the weight parameter, and padding the weight parameter in a case where the dimension value in at least one dimension of the weight parameter is less than the corresponding target value, the dimension value in each dimension of the weight parameter after the padding being equal to the corresponding target value.

## Claims

### Claim 1

A method for adapting parameters of a neural network, comprising:
selecting one or more dimensions for a weight parameter of each of at least one layer of the neural network;
determining a dimension value and a corresponding target value in each of the one or more dimensions of the weight parameter; and
padding the weight parameter in at least one dimension of the one or more dimensions in a case where the dimension value in the at least one dimension of the weight parameter is less than the corresponding target value, the dimension value in each of the one or more dimensions of the weight parameter obtained after the padding being equal to the corresponding target value.

### Claim 2 (depends on 1)

The method of claim 1 wherein the one or more dimensions comprise at least one of width, height, depth, and number.

### Claim 3 (depends on 1)

The method of claim 1 wherein the one or more dimensions comprise a first dimension, the corresponding target value in the first dimension of the weight parameter being determined based on a subset of a set of candidate values associated with the first dimension, and each candidate value in the subset being greater than or equal to the dimension value in the first dimension of the weight parameter.

### Claim 4 (depends on 3)

The method of claim 3 wherein the corresponding target value in the first dimension of the weight parameter is a minimum candidate value in the subset.

### Claim 5 (depends on 3)

The method of claim 3 wherein the first dimension comprises depth or number and the set comprises one or more common multiples of a first parameter and a second parameter, the first parameter and the second parameter being predetermined based on hardware parameters.

### Claim 6 (depends on 1)

The method of claim 1 wherein the one or more dimensions comprise a first dimension and at least one second dimension, the corresponding target values in the first dimension and the at least one second dimension of the weight parameter being determined based on a subset of a set of candidate value arrays, each of the candidate value arrays in the set comprising a first candidate value corresponding to the first dimension and at least one second candidate value corresponding respectively to the at least one second dimension, and each candidate value in each candidate value array in the subset being greater than or equal to the dimension value in a corresponding dimension of the weight parameter, respectively.

### Claim 7 (depends on 6)

The method of claim 6 wherein the corresponding target value in the first dimension of the weight parameter is a minimum first candidate value determined based on the subset.

### Claim 8 (depends on 6)

The method of claim 6 wherein the corresponding target values in the first dimension and the at least one second dimension of the weight parameter are corresponding candidate values in a first candidate value array in the subset, respectively, a product of all candidate values in the first candidate value array being less than a product of all candidate values in any other candidate value array in the subset.

### Claim 9 (depends on 6)

The method of claim 6 wherein the first dimension comprises width or height or depth, and the set comprises one or more corresponding candidate value arrays for each combination of corresponding target values in the first dimension and the at least one second dimension of the weight parameter, each combination being predetermined based on hardware parameters.

### Claim 10 (depends on 1)

The method of claim 1 further comprising:
for each dimension of the at least one dimension, determining a padding mode corresponding to the dimension, the padding mode indicating at least one of one or more padding positions, padding amounts, and rules for setting padding values for padding the weight parameter in the dimension.

### Claim 11 (depends on 10)

The method of claim 10 wherein the one or more dimensions comprise at least one of width, height, depth, and number,
an information indicated by the padding mode corresponding to width comprises padding one or more columns at one or more positions on left side and/or on right side and/or in middle in a direction of width,
an information indicated by the padding mode corresponding to height comprises padding one or more rows at one or more positions on top side and/or on bottom side and/or in middle in a direction of height,
an information indicated by the padding mode corresponding to depth comprises padding one or more banks at one or more positions on front side and/or on rear side and/or in middle in a direction of depth, and
an information indicated by the padding mode corresponding to number comprises padding one or more padding values at one or more positions before and/or after and/or in a sequence of the weight parameter.

### Claim 12 (depends on 10)

The method of claim 10 wherein the rules for setting the padding values comprise at least one of padding by using a zero value, padding by using one or more predefined non-zero values, and padding by using values in the weight parameter at positions adjacent to positions to be padded.

### Claim 13 (depends on 1)

The method of claim 1 further comprising:
padding, in corresponding width and/or height and/or depth, a feature data of a layer to which the weight parameter belongs, in a case where the at least one dimension comprises width and/or height and/or depth.

### Claim 14 (depends on 13)

The method of claim 13 wherein padding positions and padding amounts in each dimension to be padded for the feature data are the same as padding positions and padding amounts in a corresponding dimension for the weight parameter, respectively.

### Claim 15 (depends on 13)

The method of claim 13 wherein the feature data is padded by using at least one of a zero value, one or more predefined non-zero values, values in the feature data at positions adjacent to positions to be padded, and random values.

### Claim 16 (depends on 1)

The method of claim 1 wherein the neural network is a convolutional neural network.

### Claim 17 (depends on 1)

An apparatus for adapting parameters of a neural network, comprising:
one or more processors configured to perform the method of claim 1.

### Claim 18

An apparatus for adapting parameters of a neural network, comprising:
a detector configured to determine a dimension value and a corresponding target value in each of one or more selected dimensions of a weight parameter of each of at least one layer of the neural network; and
a padder configured to pad the weight parameter in at least one dimension of the one or more selected dimensions in a case where the dimension value in the at least one dimension of the weight parameter is less than the corresponding target value, the dimension value in each of the one or more selected dimensions of the weight parameter obtained after the padding being equal to the corresponding target value.

### Claim 19 (depends on 1)

A non-transitory storage medium having program instructions stored thereon for performing the method of claim 1.
