Grouped convolution processing definition changing device, grouped convolution processing definition changing method, and grouped convolution processing definition changing program
AssigneeNEC Corporation
InventorSeiya Shibata
Life of this patent
Estimating the term…
Abstract
A generation unit generates a new j-th weight matrix to be used in the convolution computation of data consisting of {(j−1)×N/g+1} to (j×N/g) channels (j=1 to g) divided after the divided number is changed over j=1 to j=g respectively. The generation unit generates the new j-th weight matrix by placing {(j−1)×G/g+1} to (j×G/g) weight matrices from the upper left to the lower right of the new j-th weight matrix in the order of {(j−1)>G/g+1} to (j×G/g) weight matrices on the diagonal line, and setting values of all components except for components at locations where the weight matrices are placed to 0.
Claims9
A grouped convolution processing definition changing device for increasing computation speed of grouped convolution, the grouped convolution processing definition changing device comprising:
- a memory configured to store instructions;
- and
- a processor configured to execute the instructions to:
- change, for a learned convolutional neural network in which grouped convolution is defined in which input data consisting of first to N-th channels (N is an integer greater than or equal to 2) arranged in order is divided into G (G is an integer greater than or equal to 2) pieces in a channel direction so that divided data consisting of {(i−1)×N/G+1} to (i×N/G) channels (i=1 to G) are obtained, and in which convolution computations are executed for the divided data consisting of {(i−1)×N/G+1} to (i×N/G) channels (i=1 to G) using i-th weight matrix over i=1 to i=G respectively,
- a number of divisions of the input data from G to g (where g is a divisor of G excluding G);
- and
- generate a new j-th weight matrix to be used in the convolution computation of data consisting of {(j−1)×N/g+1} to (j×N/g) channels (j=1 to g) divided after the number of divisions of the input data is changed over j=1 to j=g respectively,
- wherein the processor generates the new j-th weight matrix by placing {(j−1)×G/g+1} to (j×G/g) weight matrices from the upper left to the lower right of the new j-th weight matrix in the order of {(j−1)×G/g+1} to (j×G/g) weight matrices on the diagonal line, and setting values of all components except for components at locations where the weight matrices are placed to 0.
A grouped convolution processing definition changing method for increasing computation speed of grouped convolution, the grouped convolution processing definition changing method comprising:
- changing, for a learned convolutional neural network in which grouped convolution is defined in which input data consisting of first to N-th channels (N is an integer greater than or equal to 2) arranged in order is divided into G (G is an integer greater than or equal to 2) pieces in a channel direction so that divided data consisting of {(i−1)×N/G+1} to (i×N/G) channels (i=1 to G) are obtained, and in which convolution computations are executed for the divided data consisting of {(i−1)×N/G+1} to (i×N/G) channels (i=1 to G) using i-th weight matrix over i=1 to i=G respectively,
- a number of divisions of the input data from G to g (where g is a divisor of G excluding G);
- generating a new j-th weight matrix to be used in the convolution computation of data consisting of {(j−1)×N/g+1} to (j×N/g) channels (j=1 to g) divided after the number of divisions of the input data is changed over j=1 to j=g respectively;
- and
- generating the new j-th weight matrix by placing {(j−1)×G/g+1} to (j×G/g) weight matrices from the upper left to the lower right of the new j-th weight matrix in the order of {(j−1)×G/g+1} to (j× G/g) weight matrices on the diagonal line, and setting values of all components except for components at locations where the weight matrices are placed to 0.
A non-transitory computer-readable recording medium recording a grouped convolution processing definition changing program for increasing computation speed of grouped convolution, the grouped convolution processing definition changing program causing a computer to execute:
- a changing process of changing, for a learned convolutional neural network in which grouped convolution is defined in which input data consisting of first to N-th channels (N is an integer greater than or equal to 2) arranged in order is divided into G (G is an integer greater than or equal to 2) pieces in a channel direction so that divided data consisting of {(i−1)×N/G+1} to (i×N/G) channels (i=1 to G) are obtained, and in which convolution computations are executed for the divided data consisting of {(i−1)×N/G+1} to (i×N/G) channels (i=1 to G) using i-th weight matrix over i=1 to i=G respectively,
- a number of division of the input data from G to g (where g is a divisor of G excluding G);
- and
- a generation process of generating a new j-th weight matrix to be used in the convolution computation of data consisting of {(j−1)×N/g+1} to (j×N/g) channels (j=1 to g) divided after the number of divisions of the input data is changed over j=1 to j=g respectively,
- wherein the grouped convolution processing definition changing program causes the computer to generate the new j-th weight matrix by placing {(j−1)×G/g+1} to (j×G/g) weight matrices from the upper left to the lower right of the new j-th weight matrix in the order of {(j−1)×G/g+1} to (j× G/g) weight matrices on the diagonal line, and setting values of all components except for components at locations where the weight matrices are placed to 0, in the generation process.
Dependencies are inferred from the claim text.