Method and apparatus for processing convolution operation in neural network
AssigneeSamsung Electronics Co., Ltd.
InventorSehwan Lee
Life of this patent
Estimating the term…
Abstract
Provided are a method of performing a convolution operation between a kernel and an input feature map based on reuse of the input feature map, and a neural network apparatus using the method. The neural network apparatus generates output values of an operation between each of weights of a kernel and an input feature map, and generates an output feature map by accumulating the output values at positions in the output feature map that are set based on positions of the weights in the kernel.
Claims22
A neural network apparatus comprising:
- a processor configured to:
- generate output values of respective operations of the processor for each of plural weights of a kernel with respect to an input feature map, with each of the operations being between a different weight of the kernel and a same pixel of the input feature map;
- and
- generate an output feature map by accumulating the output values, for each of one or more respective pixels of the input feature map, at positions in the output feature map that are set based on positions of the plural weights in the kernel,
- wherein, for the generating of the output values, the processor is further configured to:
- generate a first output value by performing a first operation between the input feature map and a first weight of the kernel;
- and
- generate a second output value by performing a second operation between the input feature map and a second weight of the kernel, and
- wherein, for the generating of the output feature map, the processor is further configured to:
- accumulate the first output value at a first position in the output feature map that is based on a position of the first weight in the kernel;
- and
- accumulate the second output value at a second position in the output feature map that is based on a position of the second weight in the kernel,
- wherein the first weight is adjacent to the second weight in the kernel.
A method of processing a convolution operation in a neural network, the method comprising:
- generating output values respective operations of the processor for each of plural weights of a kernel with respect to an input feature map, with each of the operations being between a different weight of the kernel and a same pixel of the input feature map;
- and
- generating an output feature map by accumulating the output values, for each of one or more respective pixels of the input feature map, at positions in the output feature map that are set based on positions of the plural weights in the kernel,
- wherein the generating of the output values comprises:
- generating a first output value by performing a first operation between the input feature map and a first weight of the kernel;
- and
- generating a second output value by performing a second operation between the input feature map and a second weight of the kernel, and
- wherein the generating of the output feature map comprises:
- accumulating the first output value at a first position in the output feature map that is based on a position of the first weight in the kernel;
- and
- accumulating the second output value at a second position in the output feature map that is based on a position of the second weight in the kernel,
- wherein the first weight is adjacent to the second weight in the kernel.
A neural network apparatus comprising:
- a memory configured to store plural weights of a kernel and instructions;
- and
- a processor configured to execute the instructions to configure the processor to:
- generate first output values by performing respective operations of the processor for each of the plural weights with respect to a first region of an input feature map, with each of the operations being between a different weight and the first region;
- locate the first output values at positions in a first partial output feature map that are based on respective positions of the plural weights in the kernel;
- generate second output values by performing respective other operations of the processor for each of the plural weights with respect to a second region of the input feature map, with each of the operations being between a different weight and the second region;
- and
- locate the second output values at positions in a second partial output feature map that are based on respective positions of the plural weights in the kernel.
Dependencies are inferred from the claim text.