Neural network processing device and neural network processing method
The neural network processing device enhances product-sum calculation efficiency by parallel processing across layers using first and second product-sum calculators, reducing circuit scale and calculation time.
Patent Information
- Application Number
- JP2020036080
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-03-27
- Filing Date
- 2020-03-03
- Publication Date
- 2024-09-11
- Estimated Expiration
- 2040-03-03
AI Technical Summary
Existing neural network technologies face inefficiencies in product-sum calculations, leading to increased circuit scale and calculation time, despite methods like parallelization and pipelining within one layer, which do not sufficiently improve speed and efficiency when applied across multiple layers.
A neural network processing device with a configuration that includes first and second product-sum calculators, registers, and memories, allowing parallel execution of calculations across layers using ring buffer memories to minimize circuit scale and enhance speed and efficiency.
The device achieves higher speed and efficiency in product-sum calculations by parallel processing across layers, reducing circuit scale and simplifying design, while maintaining high performance.
Smart Images

Figure 0007548710000009 
Figure 0007548710000004 
Figure 0007548710000006
Abstract
Description
[Technical field]
[0001] The present invention relates to a neural network processing device and a neural network processing method, and more particularly to a neural network processing device that digitally performs product-sum operations in a neural network. [Background technology]
[0002] Neural networks are being put to practical use in a wide range of fields, including finance, marketing, authentication, and security, as well as in deep learning and advanced information identification and classification technologies. In the above-mentioned technologies, as functionality becomes more sophisticated, a huge amount of product-sum calculations are required, making it important to speed up and streamline product-sum calculations.
[0003] Generally, the more layers a neural network has, the higher its performance becomes. However, as the number of layers increases, the circuit size and the amount of calculations increase, requiring more calculation time. Therefore, it is necessary to configure a device while considering both the improvement of calculation functions and performance.
[0004] A conventional neuroprocessor has been proposed (Patent Document 1), which includes a matrix calculation device in which a selector is used to switch the mutual connections of multipliers, adders, memories, registers, etc., and in which a plurality of processor elements (PEs) are arranged two-dimensionally with memories and adders added to each column and each row, and an auxiliary calculation device that can operate in parallel with the matrix calculation device and performs calculations other than matrix calculations. With this configuration, it is said that the matrix calculations assigned to each processor element can be performed efficiently and flexibly, and that by performing calculations other than matrix calculations in parallel using a separate auxiliary calculation device, it is possible to process a huge number of calculations at high speed. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Publication No. 05-346914 Summary of the Invention [Problem to be solved by the invention]
[0006] However, while the above-mentioned technology enables high-speed calculations by parallelizing calculation processing within one layer, when the calculation function is also applied to the next stage, the neural network as a whole becomes inefficient, and it cannot be said that the speed and efficiency of product-sum calculations are sufficient.
[0007] Generally, methods for achieving high speed and efficiency in multiply-and-accumulate operations include parallelizing or pipelining the operation process within one layer. Also, since the number of layers varies depending on what is being processed, from the viewpoint of versatility, etc., it is common to complete the operation function in one layer and apply the same operation function in the next stage.
[0008] For example, as a simple calculation process, assume that a series of operations, reading two variables, adding the two variables, and writing the sum value to memory, is repeated three times. In a normal calculation, the input of the function is read every three clocks, and the sum value is output two cycles later, so the time required for the entire calculation process is 3 clocks x 3 (times) = 9 clocks.
[0009] If this calculation process is parallelized, it can be completed in three clocks, which is shorter than the nine clocks. However, the circuit must be capable of reading and writing multiple pieces of data simultaneously. In addition, the same number of calculation units as the number of parallelized operations is required, which increases the circuit size.
[0010] In addition, when the above calculation process is pipelined, the above series of operations are performed sequentially with a delay of three clocks using registers between layers, so that the calculation process can be completed in less than nine clocks, and since it can be executed by one arithmetic unit, the increase in circuit scale can be suppressed. However, in order to achieve further speedup, a detailed design in terms of time is required, which is complicated. In addition, in the calculation of an actual neural network, a huge number of calculations are performed, so it is necessary to efficiently combine parallelization and pipelining, and to design a circuit to achieve high-speed calculation while suppressing the circuit scale, but this is limited to efficiency within the layer, which is not sufficient.
[0011] An object of the present invention is to provide a neural network arithmetic processing device and a neural network arithmetic processing method that can achieve even faster and more efficient product-sum calculations, suppress an increase in circuit size, and perform product-sum calculations with a simple design. [Means for solving the problem]
[0012] In order to achieve the above object, the present invention provides the following means.
[0013] [1] One or more first multiply-accumulate units; one or more registers connected to the one or more first multiply-accumulate units; one or more second multiply-accumulate units connected to the one or more registers, The first multiply-accumulate unit a first memory storing a plurality of first input variables; a second memory storing a plurality of first weight data; one or more first multipliers for computing a plurality of products of the first input variables and the first weight data; one or more first adders that calculate a plurality of sums of the products multiplied by the one or more first multipliers; one or more first output units that output the sums added by the one or more first adders to the register as a plurality of second input variables; The second multiply-accumulate unit a third memory storing a plurality of second weight data; one or more second multipliers that calculate a plurality of products of the second weight data and the second input variables held in the register; one or more second adders that calculate a plurality of sums of the products multiplied by the one or more second multipliers; and one or more second output units that output the sums added by the one or more second adders as a plurality of output values. Neural network processing unit.
[0014] [2] The neural network processing device according to [1] above, wherein at least a part of the arithmetic processing executed by the second multiply-accumulate calculator is executed in parallel with the arithmetic processing executed by the first multiply-accumulate calculator.
[0015] [3] The number of operations constituting the arithmetic process P1 executed by the first multiply-add calculator 10 is (n+1) (n is an integer equal to or greater than 0), and the number of operations constituting the arithmetic process P2 executed by the second multiply-add calculator is (q+1) (q is an integer equal to or greater than 0), The neural network arithmetic processing device according to [2] above, wherein a parallel number L1 of the arithmetic process P1 executed by the first multiply-add calculator is a divisor of the number of operations (n+1), and a parallel number L2 of the arithmetic process P2 executed by the second multiply-add calculator is a divisor of the number of operations (q+1).
[0016] [4] The neural network arithmetic processing device according to [3] above, wherein the number of pipelines C1 constituting the arithmetic process P1 and the number of pipelines C2 constituting the arithmetic process P2 are both common divisors of the number of operations (n+1) and the number of operations (q+1).
[0017] [5] The neural network arithmetic processing device according to [4] above, wherein the number of pipelines C1 constituting the arithmetic process P1 and the number of pipelines C2 constituting the arithmetic process P2 are both the greatest common divisor of the number of operations (n+1) and the number of operations (q+1).
[0018] [6] The neural network arithmetic processing device according to any one of [3] to [5] above, wherein the timing at which the arithmetic processing executed by the second multiply-accumulate calculator ends is the same as the timing at which the arithmetic processing by the first multiply-accumulate calculator ends.
[0019] [7] The neural network processing device according to [1] above, wherein each of the second memory and the third memory is a ring buffer memory.
[0020] [8] The neural network processing device according to [1] above, further comprising one or more activation function calculation processing units that perform calculations using an activation function, at least either between the first multiply-accumulate unit and the register or between the register and the second multiply-accumulate unit.
[0021] [9] the one or more first multipliers are a plurality of first multipliers; The neural network processing device according to any one of the above [2] to [8], wherein the one or more first adders are a plurality of first adders.
[0022]
[10] The one or more second multiply-accumulate units are a plurality of the second multiply-accumulate units, The neural network processing device according to any one of [2] to [9] above, wherein the plurality of second product-accumulators operate in parallel with the one or more first product-accumulators.
[0023]
[11] The one or more first multiply-accumulate units are a plurality of the first multiply-accumulate units, The neural network processing device according to any one of [2] to [9] above, wherein the plurality of first product-accumulators operate in parallel with the one or more second product-accumulators.
[0024]
[12] The one or more first multiply-accumulate units are a plurality of the first multiply-accumulate units, the one or more second multiply-accumulate units are a plurality of the second multiply-accumulate units, The neural network processing device according to any one of [2] to [9] above, wherein the plurality of first product-accumulators operate in parallel with the plurality of second product-accumulators.
[0025]
[13] a first calculation step of calculating a plurality of products of a first input variable and first weight data, and calculating a plurality of sums of the products; a storage step of storing the plurality of sums calculated in the first calculation step as a plurality of second input variables; a second calculation step of calculating a plurality of products of second weight data and the second input variables and calculating a plurality of sums of the products; a second output step of outputting the plurality of sums calculated in the second calculation step as a plurality of output values, A neural network computation method, wherein at least a part of the computation executed in the second computation step is executed in parallel with the computation executed in the first computation step. Effect of the Invention
[0026] According to the present invention, it is possible to provide a neural network arithmetic processing device and a neural network arithmetic processing method that can realize even faster and more efficient product-sum calculations, suppress an increase in circuit size, and perform product-sum calculations with a simple design. [Brief description of the drawings]
[0027] [Figure 1] FIG. 1 is a schematic diagram illustrating an example of the configuration of a neural network processing device according to an embodiment of the present invention. [Diagram 2] FIG. 2(a) is a schematic diagram showing an example of the configuration of a neural network to which the neural network arithmetic processing device of FIG. 1 is applied, FIG. 2(b) is a diagram showing the operation of a first multiply-accumulate calculator of FIG. 2(a), and FIG. 2(c) is a diagram showing the operation of a second multiply-accumulate calculator of FIG. 2(a). [Diagram 3]FIG. 3(a) is a diagram showing the signal flow in the first stage in the neural network of FIG. 2, FIG. 3(b) is a diagram showing the operation of the first multiply-accumulate calculator in the flow of FIG. 3(a), and FIG. 3(c) is a diagram showing the operation of the second multiply-accumulate calculator in the flow of FIG. 3(a). [Figure 4] FIG. 4(a) is a diagram showing the signal flow in the second stage in the neural network of FIG. 2, FIG. 4(b) is a diagram showing the operation of the first multiply-accumulate calculator in the flow of FIG. 4(a), and FIG. 4(c) is a diagram showing the operation of the second multiply-accumulate calculator in the flow of FIG. 4(a). [Diagram 5] FIG. 5(a) is a diagram showing the signal flow at the third stage in the neural network of FIG. 2, FIG. 3(b) is a diagram showing the operation of the first multiply-accumulate calculator in the flow of FIG. 3(a), and FIG. 3(c) is a diagram showing the operation of the second multiply-accumulate calculator in the flow of FIG. 3(a). [Figure 6] FIG. 6(a) is a diagram showing the signal flow at the fourth stage in the neural network of FIG. 2, FIG. 6(b) is a diagram showing the operation of the first multiply-accumulate calculator in the flow of FIG. 6(a), and FIG. 6(c) is a diagram showing the operation of the second multiply-accumulate calculator in the flow of FIG. 6(a). [Figure 7] 7(a) is a diagram showing the signal flow at the fifth stage in the neural network of FIG. 2, FIG. 7(b) is a diagram showing the operation of the first multiply-accumulate calculator in the flow of FIG. 7(a), and FIG. 7(c) is a diagram showing the operation of the second multiply-accumulate calculator in the flow of FIG. 7(a). [Figure 8] FIG. 8 is a diagram showing an example of a time chart of the arithmetic processing executed by the first product-sum calculator and the arithmetic processing executed by the second product-sum calculator in FIG. [Figure 9] 9 is a schematic diagram showing an example of the number of parallel processes and the number of pipelines of the arithmetic processing executed by the first multiply-add calculator in FIG. 2 and the number of parallel processes and the number of pipelines of the arithmetic processing executed by the second multiply-add calculator in FIG. 2, and FIG. 9(b) is a diagram showing a modified example of a time chart of the arithmetic processing of the first multiply-add calculator and the arithmetic processing of the second multiply-add calculator in FIG. 9(a). [Figure 10]FIG. 10 is a schematic diagram illustrating a modified example of the configuration of the neural network processing device of FIG. [Figure 11] FIG. 11 is a flowchart showing an example of a neural network processing method executed by the neural network processing device of FIG. [Figure 12] FIG. 12 is a schematic diagram illustrating another modified example of the configuration of the neural network processing device of FIG. [Figure 13] FIG. 13 is a schematic diagram illustrating a modified example of the configuration of the first product-sum calculator and the second product-sum calculator in FIG. [Figure 14] FIG. 14 is a schematic diagram illustrating a modified example of the configuration of the neural network arithmetic processing device of FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0028] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0029] [Configuration of neural network processing unit] FIG. 1 is a schematic diagram illustrating an example of the configuration of a neural network processing device according to an embodiment of the present invention. As shown in FIG. 1, the neural network processing device 1 includes a first product-sum calculator 10, a register 20 connected to the first product-sum calculator 10, and a second product-sum calculator 30 connected to the register 20.
[0030] The first product-sum calculator 10 has a first memory 11 storing a plurality of first input variables, a second memory 12 storing a plurality of first weight data, a first multiplier 13 calculating a plurality of products of the first input variables and the first weight data, a first adder 14 calculating a plurality of sums of the products multiplied by the first multiplier 13, and a first output unit 15 outputting the plurality of sums added by the first adder 14 to a register 20 as a plurality of second input variables. In this embodiment, the first product-sum calculator 10 constitutes a digital product-sum calculation circuit.
[0031] The first memory 11 stores a plurality of first input variables x0, x1, x2, ... x n (n is an integer equal to or greater than 0) is stored, and a first multiply-add calculator 10 calculates a plurality of first input variables x0, x1, x2, ... x n The first memory 11 stores, for example, a plurality of first input variables x0, x1, x2, ... x n is stored as a matrix A with (n+1) rows and 1 column (n-dimensional column vector). The first memory 11 may be configured as a ring buffer memory. Since the memory that stores the first input variables does not require random accessibility, the first product-adder 10 can be configured simply by configuring the first memory 11 as a ring buffer memory. Furthermore, the first memory 11 can be configured to write and store data other than the first input variables.
[0032] The second memory 12 stores a plurality of first weight data ω 00 ,ω 01 ,ω 02 ,…ω mn (m is an integer equal to or greater than 0) is stored, and a first multiply-add calculator 10 calculates a plurality of first weight data ω 00 ,ω 01 ,ω 02 ,…ω mn is read out. The second memory 12 stores, for example, a plurality of first weighting data as a matrix B of (m+1) rows and (n+1) columns. The second memory 12 can be configured to write and store data other than the first weighting data.
[0033] The second memory 12 may be configured as a ring buffer memory. Since the memory that stores the first weight data does not require random accessibility, the first multiply-add calculator 10 can be configured simply by configuring the second memory 12 as a ring buffer memory.
[0034] In this embodiment, the first product-sum calculator 10 includes a first memory 11 and a second memory 12, but is not limited thereto, and may include a single memory for storing the plurality of first input variables and the plurality of first weight data instead of the first memory 11 and the second memory 12. By sharing a single memory, an increase in the circuit scale can be suppressed.
[0035] The first multiplier 13 multiplies the first input variables x0, x1, x2, ... x n x of i and the first weight data ω 00 ,ω 01 ,ω 02 ,…ω mn Of the ω jk The input is the product ω jk x i The first multiplier 13 is configured as a digital multiplier.
[0036] The first adder 14 outputs the product ω jk x i As input, multiple products ω jk x i Sum of Σω jk x i to the second input variables i0,i1,i2,…i m (m is an integer equal to or greater than 0) The first adder 14 is configured as a digital adder.
[0037] The calculation of the first multiplier 13 and the first adder 14 can be expressed as a product BA of a matrix B with (m+1) rows and (n+1) columns and a matrix A with (n+1) rows and 1 column. In this case, the multiple second input variables i0, i1, i2, ...i m is expressed as a matrix C with (m+1) rows and 1 column.
[0038] The register 20 holds the sums output from the first output unit 15 of the first product-sum calculator 10 as a plurality of second input variables. The register 20 also outputs the second input variables to the second product-sum calculator 30.
[0039] The second product-sum calculator 30 includes an input section 31 to which the second input variables output from the register 20 are input, a third memory 32 storing a plurality of second weight data, second multipliers 33-1 and 33-2 for calculating a plurality of products of the second weight data and the second input variables held in the register 20, second adders 34-1 and 34-2 for calculating a plurality of sums of the products multiplied by the second multipliers 33-1 and 33-2, respectively, and second output sections 35-1 and 35-2 for outputting the sums added by the second adders 34-1 and 34-2, respectively, as a plurality of output values. In this embodiment, the second product-sum calculator 30 constitutes a digital product-sum calculation circuit, similar to the first product-sum calculator 10.
[0040] The third memory 32 stores a plurality of second weight data w 00 ,w 01 ,w 02 ,…w pq (p and q are both integers equal to or greater than 0) are stored, and a plurality of second weight data w 00 ,w 01 ,w 02 ,…w pq is read out. The third memory 32 stores, for example, a plurality of second weighting data as a matrix D with (p+1) rows and (q+1) columns. As an example, p=m-1, q+1=m+1, that is, q=m, and a plurality of second weighting data is stored as a matrix D with (p+1) rows and (m+1) columns.
[0041] The third memory 32 may be configured as a ring buffer memory. Since the memory that stores the second weight data does not require random accessibility, the second multiply-add calculator 30 can be configured simply by configuring the third memory 32 as a ring buffer memory.
[0042] The second multiplier 33-1 multiplies a plurality of second input variables i0, i1, i2, ... i m i of i and the second weight data w 00 ,w 01 ,w 02 ,…w pq Of the w jk The input is the product wjk i i The second multiplier 33-1 is configured as a digital multiplier. The second multiplier 33-2 has a similar configuration to the second multiplier 33-1, and therefore a description thereof will be omitted. In this embodiment, the second product-sum calculator 30 has two second multipliers 33-1 and 33-2, but is not limited to this and may have one second multiplier.
[0043] The second adder 34-1 outputs the product w jk i i As input, multiple products w jk i i Sum of Σw jk i i multiple output values y0,y1,y2,…y p As an example, let p = m-1, q = m, and output multiple products w jk i i Sum of Σw jk i i is multiple output values y0,y1,y2,…y m-1 (m is an integer equal to or greater than 0) is output. The second adder 34-1 is configured as a digital adder. The second adder 34-2 has a similar configuration to the second adder 34-1, and therefore a description thereof will be omitted. In this embodiment, the second product-sum calculator 30 has two second adders 34-1 and 34-2, but is not limited to this and may have one second adder.
[0044] The second output unit 35-1 outputs a plurality of output values y0, y1, y2, ... y p to the outside. The second output unit 35-2 has a similar configuration to the second output unit 35-1, and therefore a description thereof will be omitted. In this embodiment, the second product-sum calculator 30 has two second output units 35-1 and 35-2, but is not limited to this and may have one second output unit.
[0045] The calculations of the second multipliers 33-1, 33-2 and the second adders 34-1, 34-2 can be expressed as a product DC of a matrix D with (p+1) rows and (q+1) columns and a matrix C with (m+1) rows and 1 column, for example. As an example, where p+1=m and q+1=m+1, it can be expressed as a product DC of a matrix D with m rows and (m+1) columns and a matrix C with (m+1) rows and 1 column. In this case, the multiple output values y0, y1, y2, ...y output from the second adders 34-1, 34-2 are expressed as m-1 is expressed as a matrix E with m rows and 1 column.
[0046] In this embodiment, the second product-sum calculator 30 has two second multipliers 33-1, 33-2, second adders 34-1, 34-2, and two second output units 35-1, 35-2, but is not limited to this and may have one second multiplier, one second adder, and one second output unit.
[0047] FIG. 2(a) is a schematic diagram showing an example of the configuration of a neural network 40 to which the neural network processing device 1 of FIG. 1 is applied. As shown in FIG. 2, the neural network 40 includes an input layer 41, a hidden layer 42 (also called an intermediate layer), an output layer 43, a first product-add calculator 10 that performs calculations between the input layer 41 and the hidden layer 42, and a second product-add calculator 30 that performs calculations between the hidden layer 42 and the output layer 43.
[0048] The input layer 41 includes, for example, five nodes 41A, 41B, 41C, 41D, and 41E. Five first input variables x0, x1, x2, x3, and x4 are provided to the five nodes 41A, 41B, 41C, 41D, and 41E of the input layer 41, respectively.
[0049] The hidden layer 42 includes, for example, four nodes 42A, 42B, 42C, and 42D. In the example of Fig. 2, four second input variables i0, i1, i2, and i3 are provided to the four nodes 42A, 42B, 42C, and 42D of the hidden layer 42, respectively. The four second input variables i0, i1, i2, and i3 are represented by a 4-row, 1-column matrix C as shown in Fig. 2(b), and 20 pieces of first weight data ω 00 ~ω 34The hidden layer 42 is calculated by multiplying a matrix B of 4 rows and 5 columns representing the first input variables x0 to x4 with a matrix A of 5 rows and 1 column representing the five first input variables x0 to x4. In this embodiment, the hidden layer 42 is configured with a single layer, but is not limited to this and may be configured with multiple layers.
[0050] The output layer 43 includes, for example, three nodes 43A, 43B, and 43C. In the example of FIG. 2, three output values y0, y1, and y2 are provided to three nodes 43A, 43B, and 43C of the output layer 43. The three output values y0, y1, and y2 are represented by a matrix E with 3 rows and 1 column as shown in FIG. 2(c), and 12 pieces of second weight data w 00 ~w 23 The matrix D is calculated by multiplying by DC a matrix D having 3 rows and 4 columns that represents the four second input variables i0 to i3 and a matrix C having 4 rows and 1 column that represents the four second input variables i0 to i3.
[0051] In the neural network 40 of FIG. 2, the second product-sum calculator 30 executes at least a portion of the calculation processing executed by the second multipliers 33-1, 33-2 and the second adders 34-1, 34-2 in parallel with the calculation processing executed by the first multiplier 13 and the first adder 14 of the first product-sum calculator 10.
[0052] Specifically, first, as shown in FIG. 3(a) and FIG. 3(b), the first product-sum calculator 10 calculates five pieces of first weight data ω 00 ~ω 04 The second input variable i0 is calculated from the five first input variables x0 to x4. Next, as shown in FIG. 4(a) and FIG. 4(b), the first product-sum calculator 10 calculates five pieces of first weight data ω 10 ~ω 14 The second input variable i1 is calculated from the five first input variables x0 to x4, and the second product-sum calculator 30 calculates four second weight data w 00 ,w 10 ,w 20 and the second input variable i0, the product w 00 i 0、 w 10 i0,w 20 Calculate i0.
[0053] Next, as shown in FIG. 5(a) and FIG. 5(b), the first product-sum calculator 10 calculates five pieces of first weight data ω 20 ~ω 24 The second input variable i2 is calculated from the five first input variables x0 to x4, and as shown in FIG. 5(c), the second product-sum calculator 30 calculates four pieces of second weight data w 01 ,w 11 ,w 21 and the second input variable i1, the product w 01 i 1、 w 11 i1, w 21 Calculate i1.
[0054] Similarly, as shown in FIG. 6(a) and FIG. 6(b), the first product-sum calculator 10 calculates five pieces of first weight data ω 30 ~ω 34 The second input variable i3 is calculated from the five first input variables x0 to x4, and as shown in FIG. 6(c), the second product-sum calculator 30 calculates four pieces of second weight data w 02 ,w 12 ,w 22 and the second input variable i2, the product w 02 i 2、 w 12 i2, w 22 Calculate i2.
[0055] As shown in FIG. 7(a) and FIG. 7(b), the second product-sum calculator 30 calculates the four pieces of second weight data w 03 ,w 13 ,w 23 and the second input variable i3, the product w 03 i 3、 w 13 i3, w 23i3 is calculated. As a result, three output values y0, y1, and y2 are obtained. In this way, the calculation process of the first product-sum calculator 10 and the calculation process of the second product-sum calculator 30 proceed simultaneously, thereby shortening the time from when the first product-sum calculator 10 starts the calculation process of the second input variables i0 to i3 to when the output values y0 to y2 are obtained. In particular, the time required for the calculation process is significantly shortened compared to when the second product-sum calculator 30 executes the calculation process of the output values y0 to y2 after the first product-sum calculator 10 finishes the calculation process of the second input variables i0 to i3.
[0056] FIG. 8 is a diagram showing an example of a time chart of the calculation process executed by the first product-sum calculator 10 and the calculation process executed by the second product-sum calculator 30 in FIG. In FIG. 8, it is assumed that the arithmetic processing executed by the first product-sum calculator 10 is divided into a first stage to a (m+1)th stage, and a plurality of arithmetic processing P1A(1), P1A(2), ... P1A(n+1) (n is an integer equal to or greater than 0) is executed in each stage. It is also assumed that the arithmetic processing executed by the second product-sum calculator 30 is divided into a first stage to a (p+1)th stage, and a plurality of arithmetic processing P2A(1), P2A(2), ... P2A(q+1) (q is an integer equal to or greater than 0) is executed in each stage. At this time, the arithmetic processing P2A(1) executed by the second product-sum calculator 30 is executed in parallel with the processing time T1A(2) of the arithmetic processing P1A(2) executed by the first product-sum calculator 10. It is also assumed that the arithmetic processing P2A(2) executed by the second product-sum calculator 30 is executed in parallel with the arithmetic processing P1A(3) executed by the first product-sum calculator 10. Thereafter, in a similar manner, the arithmetic process P2A(i) executed by the second product-sum calculator 30 is executed in parallel with the arithmetic process P1A(i+1) executed by the first product-sum calculator 10.
[0057] In this embodiment, the arithmetic process P2A(i) executed by the second product-sum calculator 30 starts simultaneously with the arithmetic process P1A(i+1) executed by the first product-sum calculator 10. Also, the time T2A(i) required for the arithmetic process P2A executed by the second product-sum calculator 30 is shorter than the time T1A(i+1) required for the arithmetic process P1A executed by the first product-sum calculator 10. Therefore, the arithmetic process P2A(i) executed by the second product-sum calculator 30 ends before the arithmetic process P1A(i+1) executed by the first product-sum calculator 10 ends.
[0058] Furthermore, in this embodiment, the entire processing time T2A(i) of the arithmetic process P2A(i) executed by the second product-sum calculator 30 overlaps with a part of the processing time T1A(i+1) of the arithmetic process P1A(i+1) executed by the first product-sum calculator 10. As a result, the processing time is shortened by the sum ΣT2A(i) of the total processing times required for the arithmetic processes P2A(1), P2A(2), ..., P2A(q+1) compared to the case where the arithmetic processes P2A(1), P2A(2), ..., P2A(q+1) are executed by the second product-sum calculator 30 after all of the arithmetic processes P1A(1), P1A(2), ..., P1A(n+1) in the first product-sum calculator 10 are completed.
[0059] The arithmetic process P2A(i) executed by the second product-sum calculator 30 only needs to overlap at least a part of the arithmetic process P1A(i+1) executed by the first product-sum calculator 10. Furthermore, the arithmetic process P2A(i) executed by the second product-sum calculator 30 does not have to be started simultaneously with the arithmetic process P1A(i+1) executed by the first product-sum calculator 10, and may be started before the arithmetic process P1A(i+1) starts, or may be started after the arithmetic process P1A(i+1) starts.
[0060] Fig. 9(a) is a schematic diagram showing an example of the number of parallel processes and the number of pipelines of the arithmetic process P1 executed by the first product-adder 10 in Fig. 2, and an example of the number of parallel processes and the number of pipelines of the arithmetic process P2 executed by the second product-adder 30. Fig. 9(b) is a diagram showing a modified example of the time chart of the arithmetic process P1 of the first product-adder 10 and the arithmetic process P2 of the second product-adder 30 in Fig. 9(a).
[0061] 9(a), when the number of operations constituting the arithmetic process P1B executed by the first product-adder 10 is (n+1) (n is an integer equal to or greater than 0) and the number of operations constituting the arithmetic process P2B executed by the second product-adder 30 is (q+1) (q is an integer equal to or greater than 0), it is preferable that the parallel number L1 of the arithmetic process P1B executed by the first product-adder 10 is a divisor of the number of operations (n+1), and the parallel number L2 of the arithmetic process P2B executed by the second product-adder 30 is a divisor of the number of operations (q+1). For example, when the number of operations of the arithmetic process P1B is (n+1)=784 and the number of operations of the arithmetic process P2B is (q+1)=256, the parallel number L1 of the arithmetic process P1B can be set to 49 and the parallel number L2 of the arithmetic process P2B can be set to 16.
[0062] In addition, when the number of operations of the arithmetic process P1B is (n+1) and the number of operations of the arithmetic process P2B is (q+1), it is preferable that both the number of pipelines C1 constituting the arithmetic process P1B and the number of pipelines C2 constituting the arithmetic process P2B are common divisors of the number of operations (n+1) and the number of operations (q+1). As an example, when the number of operations of the arithmetic process P1B is (n+1)=784 and the number of operations of the arithmetic process P2B is (q+1)=256, both the number of pipelines C1 of the arithmetic process P1B and the number of pipelines C2 of the arithmetic process P2B can be set to 2, 4, 8, or 16, which are common divisors of 784 and 256. The number of pipelines (length of the pipeline) is determined by the number of operations of each arithmetic unit and the number of arithmetic units. In this case, if the number of arithmetic units is a divisor of the number of operations, the calculation can be performed efficiently. Calculation efficiently means that the arithmetic units perform calculations without stopping. Therefore, by making the pipeline numbers C1 and C2 a common divisor of the number of operations (n+1) and the number of operations (q+1), the lengths of the pipeline numbers C1 and C2 can be made uniform, so that the efficiency of the calculation process P1B executed by the first multiply-add arithmetic unit 10 and the calculation process P2B executed by the second multiply-add arithmetic unit 30 can be improved.
[0063] Furthermore, when the number of operations of the arithmetic process P1B is (n+1) and the number of operations of the arithmetic process P2B is (q+1), it is more preferable that both the number of pipelines C1 constituting the arithmetic process P1B and the number of pipelines C2 constituting the arithmetic process P2B are the greatest common divisors of the number of operations (n+1) and the number of operations (q+1). As an example, when the number of operations of the arithmetic process P1B is (n+1)=784 and the number of operations of the arithmetic process P2B is (q+1)=256, both the number of pipelines C1 of the arithmetic process P1B and the number of pipelines C2 of the arithmetic process P2B can be set to 16, which is the greatest common divisor of 784 and 256. This improves the efficiency of the arithmetic process P1B executed by the first product-sum calculator 10 and the arithmetic process P2B executed by the second product-sum calculator 30, and also makes it possible to minimize the circuit scale.
[0064] It is also preferable to adjust the timing at which the arithmetic process P2B(i) executed by the second product-sum calculator 30 ends to be the same as the timing at which the arithmetic process P1B(i+1) executed by the first product-sum calculator 10 ends. For example, as shown in FIG. 9(b), the processing time T2B(1) of the arithmetic process P2B(1) can be set to be the same as the processing time T1B(2) of the arithmetic process P1B(2). Similarly, the processing time T2B(i) of the arithmetic process P2B(i) can be set to be the same as the processing time T1B(i+1) of the arithmetic process P1B(i+1). This can maximize the efficiency of the arithmetic process P1B executed by the first product-sum calculator 10 and the arithmetic process P2B executed by the second product-sum calculator 30, and further suppress the increase in the circuit scale.
[0065] As described above, according to this embodiment, the neural network processing device 1 calculates the first input variable x i and the first weight data ω jk The product of ω jk x i ω jk x i Multiple sums of Σω jk x i (first calculation step), and the sum Σω calculated in the first calculation step is jk x imultiple second input variables i0,i1,i2,…i m The second weight data ω jk and the second input variable i i With jk i i Calculate the multiple of and multiply w jk i i Multiple sums of Σw jk i i (second calculation step), and the sum Σw calculated in the second calculation step is jk i i to multiple output values y0, y1, y2, ... y p (second output step). At least a part of the calculation process executed in the second calculation step is executed in parallel with the calculation process executed in the first calculation step. In this way, by using both the first product-sum calculator 10 and the second product-sum calculator 30 to perform parallel calculation across two layers, the hidden layer 42 and the output layer 43, it is possible to realize further high-speed and efficient product-sum calculation, suppress an increase in circuit scale, and further enable the product-sum calculation to be performed with a simple design.
[0066] Fig. 10 is a schematic diagram showing a modified example of the configuration of the neural network arithmetic processing device 1 of Fig. 1. This modified example differs from the above embodiment in that a control signal transmission unit is provided in both the first product-sum calculator and the second product-sum calculator. The same components as those in the above embodiment are given the same reference numerals as those in the above embodiment and their description is omitted, and the different parts are described below.
[0067] 10, the first product-sum calculator 10 further includes a first signal transceiver unit 16 that transmits the first control signal S1 to the second product-sum calculator 30 and receives a second control signal S2 from the second product-sum calculator 30, and a signal transmitter unit 17 that transmits the third control signal S3 to the register 20. The second product-sum calculator 30 further includes a second signal transceiver unit 36 that transmits the second control signal S2 to the second product-sum calculator 30 and receives the first control signal S1 from the first product-sum calculator 10.
[0068] When the arithmetic process of the first product-sum calculator 10 is completed, the first signal transmitting / receiving unit 16 transmits a first control signal S1 notifying the second product-sum calculator 30 that the arithmetic process of the first product-sum calculator 10 has been completed. When the arithmetic process of the first product-sum calculator 10 is completed, the signal transmitting unit 17 transmits a first control signal S3 notifying the register 20 that the arithmetic process of the first product-sum calculator 10 has been completed. In this modification, the first product-sum calculator 10 has the first signal transmitting / receiving unit 16 and the signal transmitting unit 17, but is not limited to this, and may have one signal transmitting / receiving unit that transmits the first control signal S1 to the second product-sum calculator 30, receives the second control signal S2 from the second product-sum calculator 30, and transmits the third control signal S3 to the register 20.
[0069] When the arithmetic processing of the second product-sum calculator 30 is completed, the second signal transceiver unit 36 transmits a second control signal S2 to the first product-sum calculator 10 to notify that the arithmetic processing of the second product-sum calculator 30 has been completed.
[0070] FIG. 11 is a flowchart showing an example of a neural network processing method executed by the neural network processing device 1 of FIG. 11, first, the neural network arithmetic processing device 1 sets the second control signal S2 to 1, and the second product-sum calculator 30 transmits the second control signal S2 to the first product-sum calculator 10 (step S1). Next, the neural network arithmetic processing device 1 sets the first control signal S1 to 0, and also sets the third control signal S3 to 0 (step S2). Next, the first product-sum calculator 10 executes the above-mentioned arithmetic process P1A(1) (step S3) to generate a plurality of products ω 0k x i Sum of Σω 0k x i is calculated as the second input variable i0, and the calculation process P1A(1) ends (step S4).
[0071] Thereafter, the neural network arithmetic processing device 1 sets the third control signal S3 to 1, and the first product-sum calculator 10 transmits the third control signal S3 to the second product-sum calculator 30 (step S5). Thereafter, the first product-sum calculator 10 transmits the second input variable i0 obtained by the arithmetic process P1A(1) to the register 20 via the first output unit 15. The neural network arithmetic processing device 1 holds the arithmetic result (second input variable i0) output from the first output unit 15 of the first product-sum calculator 10 in the register 20 (step S6).
[0072] Next, the neural network processing device 1 sets the first control signal S1 to 1, and the first product-sum calculator 10 transmits the first control signal S1 to the second product-sum calculator 30 (step S7). After that, the neural network processing device 1 determines whether the second control signal S2 is set to 1 (step S8), and when the second control signal S2 is set to 1, proceeds to steps S2 and S9.
[0073] Next, the neural network arithmetic processing device 1 sets the first control signal S1 to 0, sets the third control signal S3 to 0 (step S2), and further sets the second control signal S2 to 0 (step S9). At this time, the first product-sum calculator 10 executes the above-mentioned arithmetic process P1A(2) (step S3) and calculates a plurality of products x i ω 1k Sum of Σω 1k x i is calculated as the second input variable i1. In addition, the second product-sum calculator 30 executes the above-mentioned calculation process P2A(1) in parallel with the above calculation process of the first product-sum calculator 10 (step S10) to calculate the product w j0 i0,w j0 i2, w j0 i3, ...w p0 After calculating the multiples of i0, the calculation process P2A(1) ends (step S11). After that, the neural network calculation processing device 1 sets the second control signal S2 to 1, and the second product-sum calculator 30 transmits the second control signal S2 to the first product-sum calculator 10 (step S12).
[0074] Thereafter, the neural network processing device 1 repeats the above process, and the first product-sum calculator 10 sequentially calculates the second input variables i2, i3, i4, . . . i m At the same time, the second multiply-add calculator 30 also sequentially calculates the product w j1 i1, w j2 i2, w j3 i3, ...w pq i m Then, the second input variable i m Once the calculation of is completed, multiple products w 0k i i Sum of Σw 0k i i is outputted to the outside via the second output unit 35-1 and / or the second output unit 35-2 as the output value y0. Similarly, multiple products i i w 1k Sum of Σw 1k i i , multiple products w 2k i i Sum of Σw 2k i i , …multiple products w pk i i Sum of Σw pk i i are the output values y1, y2, ... y p and outputs the signal to the outside via the second output unit 35-1 and / or the second output unit 35-2.
[0075] In this modified example, by using the first control signal S1, the second control signal S2, and the third control signal to perform parallel calculations across two layers, the hidden layer 42 and the output layer 43, it is possible to achieve even faster and more efficient product-sum calculations, while suppressing an increase in circuit size, and further enabling the product-sum calculations to be performed with a simple design.
[0076] FIG. 12 is a schematic diagram illustrating another modified example of the configuration of the neural network processing device 1 of FIG. 12, the neural network processing device 1 may further include an activation function calculation unit 50 that performs calculations using an activation function between the register 20 and the second product-sum calculator 30. The activation function calculation unit 50 calculates, for example, the second input variables i2, i3, i4, ...i m is input, and the calculation result of the activation function f(i) is output to the second product-sum calculator 30. In this embodiment, the activation function f(i) is, for example, a logistic sigmoid function, a hyperbolic tangent function, a ReLU function, or an identity function.
[0077] The neural network processing device 1 may include an activation function calculation processing unit between the first product-sum calculator 10 and the register 20. Alternatively, the activation function calculation processing units may be provided both between the first product-sum calculator 10 and the register and between the register 20 and the second product-sum calculator 30.
[0078] In this way, the activation function calculation unit 50 calculates the second input variable i i By calculating the activation function f(i) using
[0079] Fig. 13 is a schematic diagram showing a modified example of the configuration of the first product-sum calculator 10 and the second product-sum calculator 30 in Fig. 10. The same components as those in the above embodiment are given the same reference numerals as those in the above embodiment, and the description thereof is omitted. The different parts are described below. As shown in FIG. 13, the first product-sum calculator 10 may include first multipliers 13-1, 13-2 that calculate multiple products of the first input variable and first weight data, and first adders 14-1, 14-2 that calculate multiple sums of the products multiplied by the two first multipliers 13-1, 13-2.
[0080] According to this modification, since the first product-sum calculator 10 includes a plurality of first multipliers, it is possible to increase the number of paths connecting the first memory 11 and the second memory 12 to the first multipliers. It is also possible to increase the amount of data read at one time of the first input variables from the first memory 11, and to increase the amount of data read at one time of the first weight data from the second memory 12. Therefore, it is possible to execute the calculation process more efficiently.
[0081] Fig. 14 is a schematic diagram showing a modified example of the configuration of the neural network arithmetic processing device 1 of Fig. 10. The same components as those in the above embodiment are given the same reference numerals as in the above embodiment, and the description thereof is omitted. The different parts are described below. As shown in FIG. 14, the neural network arithmetic processing device 1 may include first product-sum calculators 10-1 and 10-2, registers 20-1 and 20-2 connected to the first product-sum calculators 10-1 and 10-2, respectively, and second product-sum calculators 30-1 and 30-2 connected to the registers 20-1 and 20-2.
[0082] The first product-sum calculator 10-1 includes a first memory 11-1, a second memory 12-1, first multipliers 13-1 and 13-2, first adders 14-1 and 14-2, a first output unit 15-1, a first signal transmitting / receiving unit 16-1, and a signal transmitting unit 17-1. The first product-sum calculator 10-2 includes a first memory 11-2, a second memory 12-2, first multipliers 13-3 and 13-4, first adders 14-3 and 14-4, a first output unit 15-2, a first signal transmitting / receiving unit 16-2, and a signal transmitting unit 17-2.
[0083] The second product-sum calculator 30-1 includes an input unit 31-1, a third memory 32-1, second multipliers 33-1 and 33-2, second adders 34-1 and 34-2, second output units 35-1 and 35-2, and a second signal transmission / reception unit 36-1. The second product-sum calculator 30-2 includes an input unit 31-2, a third memory 32-2, second multipliers 33-3 and 33-4, second adders 34-3 and 34-4, second output units 35-3 and 35-4, and a second signal transmission / reception unit 36-2.
[0084] The neural network arithmetic processing device 1 may further include a control signal relay 60 between the first product-sum calculator 10-1 and the register 20-1, and between the first product-sum calculator 10-2 and the register 20-2. The control signal relay 60 receives, for example, the first control signal S1 transmitted from the first product-sum calculator 10-1, and transmits the first control signal S1 to either or both of the second product-sum calculators 30-1 and 30-2. Furthermore, the control signal relay 60 receives the first control signal S1 transmitted from the first product-sum calculator 10-2, and transmits the first control signal S1 to either or both of the second product-sum calculators 30-1 and 30-2.
[0085] Also, the control signal repeater 60 receives the second control signal S2 transmitted from the second product-sum calculator 30-1, and transmits the second control signal S2 to either or both of the first product-sum calculators 10-1 and 10-2. Furthermore, the control signal repeater 60 receives the second control signal S2 transmitted from the second product-sum calculator 30-2, and transmits the second control signal S2 to either or both of the first product-sum calculators 10-1 and 10-2.
[0086] Furthermore, the control signal repeater 60 receives, for example, a third control signal S3 transmitted from the first product-sum calculator 10-1 and / or the first product-sum calculator 10-2, and transmits the third control signal S3 to the register 20-1 and / or the register 20-2.
[0087] According to this modification, the neural network arithmetic processing device 1 includes a plurality of first product-accumulators, a plurality of registers, and a plurality of second product-accumulators, and therefore the arithmetic processing can be executed more efficiently.
[0088] Although the embodiments of the present invention have been described in detail above, the present invention is not limited to the above-described embodiments, and various modifications and variations are possible within the scope of the gist of the present invention as described in the claims.
[0089] For example, a program for realizing the functions of each device (e.g., the neural network processing device 1) according to the above-described embodiments may be recorded on a computer-readable recording medium (storage medium), and the program recorded on this recording medium may be read into a computer system and executed to perform processing. It should be noted that the term "computer system" used here may include an operating system (OS) or hardware such as peripheral devices. Furthermore, the term "computer-readable recording medium" refers to a flexible disk, a magneto-optical disk, a ROM (Read Only Memory), a writable non-volatile memory such as a flash memory, a portable medium such as a DVD (Digital Versatile Disc), a hard disk built into a computer system, and other storage devices. The recording medium may also be, for example, a recording medium that temporarily records data.
[0090] Furthermore, the term "computer-readable recording medium" includes devices that retain a program for a certain period of time, such as volatile memory (e.g., DRAM (Dynamic Random Access Memory)) within a computer system that serves as a server or client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. The above program may be transmitted from a computer system in which the program is stored in a storage device or the like to another computer system via a transmission medium, or by transmission waves in the transmission medium. Here, the "transmission medium" that transmits the program refers to a medium that has the function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. The above program may be for implementing some of the above functions. Furthermore, the above program may be a so-called differential file (differential program) that can implement the above functions in combination with a program already recorded in the computer system. In a computer, a processor such as a CPU (Central Processing Unit) reads and executes a program stored in a memory. [Explanation of symbols]
[0091] 1. Neural network processing unit 10 First multiply-accumulate unit 10-1 First multiply-accumulate unit 10-2 First multiply-accumulate unit 11 First Memory 11-1 First memory 11-2 First memory 12 Second Memory 12-1 Second memory 12-2 Second Memory 13 First multiplier 13-1 First multiplier 13-2 First multiplier 13-3 First multiplier 13-4 First multiplier 14 First adder 14-1 First adder 14-2 First adder 14-3 First adder 14-4 First adder 15 First output section 15-1 First output section 15-2 First output section 16 First signal transmitter / receiver 16-1 First signal transceiver 16-2 First signal transmitter / receiver 17 Signal transmitter 17-1 Signal transmission section 17-2 Signal transmission section 20 Registers 20-1 Register 20-2 Register 30 Second multiply-accumulate unit 30-1 Second multiply-accumulate unit 30-2 Second multiply-accumulate unit 31 Input section 31-1 Input section 31-2 Input section 32 Third Memory 32-1 Third Memory 32-2 Third Memory 33-1 Second multiplier 33-2 Second multiplier 33-3 Second multiplier 33-4 Second multiplier 34-1 Second adder 34-2 Second adder 34-3 Second adder 34-4 Second adder 35-1 Second output section 35-2 Second output section 35-3 Second output section 35-4 Second output section 36 Second signal transmitter / receiver 36-1 Second signal transceiver 36-2 Second signal transceiver 40 Neural Networks 41 Input Layer 41A Node 41B Node 41C Node 41D Node 41E node 42 Hidden Layer 42A Node 42B node 42C Node 42D Node 43 Output layer 43A Node 43B Node 43C Node 50 Activation function calculation processing unit 60 Control signal repeater
Claims
1. one or more first multiply-accumulate units; one or more registers connected to the one or more first multiply-accumulate units; one or more second multiply-accumulate units connected to the one or more registers; The first multiply-accumulate unit a first memory storing a plurality of first input variables; a second memory storing a plurality of first weight data; one or more first multipliers for computing a plurality of products of the first input variables and the first weight data; one or more first adders for calculating a plurality of sums of the products multiplied by the one or more first multipliers; one or more first output units that output the sums added by the one or more first adders as a plurality of second input variables to the register; The second multiply-accumulate unit a third memory storing a plurality of second weight data; one or more second multipliers for calculating a plurality of products of the second weight data and the second input variables held in the register; one or more second adders for calculating a plurality of sums of the products multiplied by the one or more second multipliers; one or more second output units that output the sums added by the one or more second adders as a plurality of output values; At least a part of the arithmetic processing executed by the second multiply-accumulate unit is executed in parallel with the arithmetic processing executed by the first multiply-accumulate unit; When the number of operations constituting the arithmetic process P1 executed by the first multiply-add calculator 10 is (n+1) (n is an integer equal to or greater than 0), and the number of operations constituting the arithmetic process P2 executed by the second multiply-add calculator is (q+1) (q is an integer equal to or greater than 0), A parallel number L1 of the arithmetic process P1 executed by the first multiply-add calculator is a divisor of the number of operations (n+1), and a parallel number L2 of the arithmetic process P2 executed by the second multiply-add calculator is a divisor of the number of operations (q+1). Neural network processing unit.
2. 2. The neural network arithmetic processing device according to claim 1, wherein both of a number C1 of pipelines constituting said arithmetic process P1 and a number C2 of pipelines constituting said arithmetic process P2 are common divisors of said number of operations (n+1) and said number of operations (q+1).
3. 3. The neural network arithmetic processing device according to claim 2, wherein both of a number of pipelines C1 constituting the arithmetic process P1 and a number of pipelines C2 constituting the arithmetic process P2 are greatest common divisors of the number of operations (n+1) and the number of operations (q+1).
4. 4. The neural network processing device according to claim 1, wherein the timing at which the arithmetic process executed by the second multiply-accumulate calculator ends is the same as the timing at which the arithmetic process executed by the first multiply-accumulate calculator ends.
5. 2. The neural network processing device according to claim 1, wherein each of the second memory and the third memory is a ring buffer memory.
6. 2. The neural network processing device according to claim 1, further comprising one or more activation function calculation units that perform calculations using an activation function, at least one between the first multiply-accumulate unit and the register and between the register and the second multiply-accumulate unit.
7. the one or more first multipliers are a plurality of first multipliers; 7. The neural network processing device according to claim 1, wherein the one or more first adders are a plurality of first adders.
8. the one or more second multiply-accumulate units are a plurality of the second multiply-accumulate units, 8. The neural network processing device according to claim 1, wherein the plurality of second product-accumulators operate in parallel with the one or more first product-accumulators.
9. the one or more first multiply-accumulate units are a plurality of the first multiply-accumulate units, 8. The neural network processing device according to claim 1, wherein the plurality of first product-sum calculators operate in parallel with the one or more second product-sum calculators.
10. the one or more first multiply-accumulate units are a plurality of the first multiply-accumulate units, the one or more second multiply-accumulate units are a plurality of the second multiply-accumulate units, 8. The neural network processing device according to claim 1, wherein the first multiply-accumulate units operate in parallel with the second multiply-accumulate units.
11. a first calculation step of calculating a plurality of products of a first input variable and first weight data and calculating a plurality of sums of the products; a holding step of holding the plurality of sums calculated in the first calculation step as a plurality of second input variables; a second calculation step of calculating a plurality of products of second weight data and the second input variables and calculating a plurality of sums of the products; a second output step of outputting the plurality of sums calculated in the second calculation step as a plurality of output values, At least a part of the arithmetic processing executed in the second arithmetic step is executed in parallel with the arithmetic processing executed in the first arithmetic step; The number of operations constituting the arithmetic process P1 executed in the first arithmetic process is (n+1) (n is an integer equal to or greater than 0), and the number of operations constituting the arithmetic process P2 executed in the second arithmetic process is (q+1) (q is an integer equal to or greater than 0), A neural network calculation processing method, wherein a parallel number L1 of the calculation process P1 executed in the first calculation step is a divisor of the number of calculations (n+1), and a parallel number L2 of the calculation process P2 executed in the second calculation step is a divisor of the number of calculations (q+1).
Citation Information
Patent Citations
Signal processor
JP1993307624A
Neuro processor
JP1993346914A
Image processing method and device
JP1999185033A
