Architecture of a computer for calculating a convolution layer in a convolutional neural network
A computer for computing a convolutional layer of an artificial neural network, includes at least one set of at least two partial sum computing modules connected in series, a storage member for storing the coefficients of at least one convolution filter, each partial sum computing module comprising at least one computing unit configured so as to carry out a multiplication of an item of input data of the computer and a coefficient of a convolution filter, followed by an addition of the output of the preceding partial sum computing module in the series, each set furthermore comprising, for each partial sum computing module except the first in the series, a shift register connected at input for storing the item of input data for the processing duration of the preceding partial sum computing modules in the series.
1 . A computer for computing a convolutional layer of an artificial neural network, comprising:
at least one set of at least two partial sum computing modules connected in series, a storage member for storing the coefficients of at least one convolution filter, each partial sum computing module comprising several computing units each configured so as to carry out a multiplication of an item of input data of the computer and a coefficient of a convolution filter, followed by an addition of the output of the preceding partial sum computing module in the series or of a predefined value for the first partial sum computing module in the series,
each set furthermore comprising, for each partial sum computing module except the first in the series, a shift register connected at input for storing the item of input data for the processing duration of the preceding partial sum computing modules in the series, said shift register being connected at output to the next partial sum computing module in the series and being configured to introduce a latency equivalent to said processing duration to the data received by said next partial sum computing module in the series,
the computer furthermore comprising at least one accumulator connected at output of each set and a memory, the input data of the computer coming from at least two input matrices, each partial sum computing module being configured so as to receive, at input, the input data belonging to different input matrices and having the same coordinates in each input matrix,
in each clock cycle, a value of one of the at least two input matrices, read sequentially row by row, being received at input of one of the at least two partial sum computing modules, said value being received, in parallel, at input of each computing unit belonging to said one of the at least two partial sum computing modules, said computing units each receiving a coefficient of the convolution filter to implement a multiplication with said value in order to compute a different output neuron.
2 . The computer as claimed in claim 1 , configured so as to deliver, at output, for each input sub-matrix of dimension equal to that of the convolution filter, the value of a corresponding output neuron, the set of output neurons being arranged in at least one output matrix.
3 . The computer as claimed in claim 2 , wherein each partial sum computing module comprises at most a number of computing units equal to the dimension of the convolution filter.
4 . The computer as claimed in claim 2 , wherein each set comprises at most a number of partial sum computing modules equal to the number of input matrices.
5 . The computer as claimed in claim 2 , comprising at most a number of sets equal to the number of output matrices.
6 . The computer as claimed in claim 2 , wherein, for each received item of input data, each partial sum computing module is configured so as to compute a partial convolution result for all of the output neurons connected to the item of input data.
7 . The computer as claimed in claim 6 , wherein each partial sum computing module comprises multiple computing units, each one being configured so as to compute a partial convolution result for different output neurons of the other computing units.
8 . The computer as claimed in claim 6 , wherein each partial sum computing module is configured, for each received item of input data, so as to select, in the storage member, the coefficients of a convolution filter corresponding to the respective output neurons to be computed for each computing unit.
9 . The computer as claimed in claim 2 , wherein the input matrices are images.
10 . The computer as claimed in claim 1 , wherein the storage member has a two-dimensional toroidal topology.
11 . The computer as claimed in claim 1 , wherein the at least one accumulator connected at output of each set is configured so as to finalize a convolution computation in order to obtain the value of an output neuron from the partial sums delivered by the set the memory being used to save partial results of the convolution computation.
12 . The computer as claimed in claim 11 , wherein the addresses of the values stored in the memory are determined and configured to avoid two output neurons during the computation sharing the same memory block.
13 . The computer as claimed in claim 1 , furthermore comprising an activation module for activating an output neuron, connected at output of each accumulator.