WO2020026475A1 - ニューラルネットワーク用プロセッサ、ニューラルネットワーク用処理方法、および、プログラム - Google Patents

ニューラルネットワーク用プロセッサ、ニューラルネットワーク用処理方法、および、プログラム Download PDF

Info

Publication number
WO2020026475A1
WO2020026475A1 PCT/JP2019/005465 JP2019005465W WO2020026475A1 WO 2020026475 A1 WO2020026475 A1 WO 2020026475A1 JP 2019005465 W JP2019005465 W JP 2019005465W WO 2020026475 A1 WO2020026475 A1 WO 2020026475A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
mode
neural network
data
norm
Prior art date
Application number
PCT/JP2019/005465
Other languages
English (en)
French (fr)
Inventor
松本 真人
康史 石尾
Original Assignee
株式会社メガチップス
合同会社エイサムテクノロジー
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社メガチップス, 合同会社エイサムテクノロジー filed Critical 株式会社メガチップス
Publication of WO2020026475A1 publication Critical patent/WO2020026475A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present invention relates to a neural network technology.
  • CNN Convolutional Neural Network
  • DCNN Deep Convolutional Neural Network
  • DCNN realizes high recognition performance in various tasks such as general object recognition and semantic segmentation.
  • the DCNN requires an extremely large amount of calculation and a large number of parameters to execute the processing, and therefore requires a huge processing time and a large memory when executing the processing.
  • the recognition accuracy tends to be improved by making the layer deeper, which causes a problem that the model size increases in addition to the identification time (processing time).
  • the identification time processing time
  • high-speed identification calculation and compression of a model size are major issues.
  • a learned model learned and acquired by a large-scale system on a low-spec device such as an embedded device or a mobile device (for example, an edge terminal)
  • the size of the learned model must be reduced in the low-spec device. It is necessary to construct a model that has been trained, and use the learning data used for the trained model to learn again in the compact model (this learning is referred to as “re-learning”).
  • the present invention can mount a high-performance compact model in a low-spec device (eg, edge terminal) such as an embedded device or a mobile device without the need for re-learning. It is an object to realize a neural network processor, a neural network data processing method, and a program.
  • a low-spec device eg, edge terminal
  • a first invention is a neural network processor for executing a multivalued neural network process including a convolutional layer process and a fully connected layer process, comprising: , A quantization processing unit and an inner product processing unit.
  • the control unit sets a scaling coefficient vector which is real number vector data, and sets a multi-value basis matrix having multi-value data as elements.
  • the quantization processing unit performs a quantization process on the feature map input to the convolutional layer and the feature vector input to the fully connected layer. Further, the quantization processing unit sets an offset value such that the minimum value of the feature map and the minimum value of the feature vector are smaller than predetermined values, and based on the maximum value and the minimum value of the feature map and the feature vector.
  • the quantization processing is executed using the quantization width acquired by the above.
  • the inner product processing unit executes an inner product operation process using (1) a norm mode for calculating the norm of the feature map and the feature vector, and (2) a multi-valued base matrix and the feature map or the feature vector after the quantization process. And an inner product operation mode.
  • the inner product processing unit executes the process of the convolutional layer and the process of the fully connected layer by executing the process of the norm mode and the process of combining the inner product operation mode.
  • this neural network processor in the processing of the convolutional layer and the processing of the fully connected layer, a part where the same processing is executed is shared, and two modes ((1) norm mode and (2) inner product operation mode) are used. By executing the processing in which the processing is combined, it is possible to execute the processing of the convolutional layer and the processing of the fully connected layer. Therefore, this neural network processor can execute neural network processing at high speed while suppressing an increase in hardware scale.
  • a second invention is the first invention, wherein the inner product processing unit includes a microcode acquisition unit that acquires a norm mode microcode and an inner product operation mode microcode, and an arithmetic operation based on the microcode.
  • An arithmetic operation processing unit that executes processing. (1) When set to norm mode, The microcode acquisition unit acquires the norm mode microcode, and the arithmetic operation processing unit executes an arithmetic operation process based on the norm mode microcode. (2) When the inner product calculation mode is set, The microcode acquisition unit acquires the inner product operation mode microcode, and the arithmetic operation processing unit executes an arithmetic operation process based on the inner product operation mode microcode.
  • this neural network processor in the processing of the convolutional layer and the processing of the fully connected layer, a part where the same processing is executed is shared, and two modes ((1) norm mode and (2) inner product operation mode) are used. The processing is executed by processing with microcode corresponding to each mode. In this neural network processor, the processing of different parts in the processing of the convolutional layer and the processing of the fully connected layer is realized by combining the above two modes of processing in an appropriate order. Therefore, this neural network processor can execute neural network processing at high speed while suppressing an increase in hardware scale.
  • a third invention is the first or the second invention, wherein the inner product processing unit executes processing of the convolutional layer, (1) The norm mode processing is repeatedly executed for the number of feature maps of the convolutional layer to be processed, (2) Each time the norm mode processing is performed for each feature map, the process in the inner product calculation mode is repeatedly executed for the number of outputs of the convolutional layer to be processed.
  • the neural network processor can execute the processing of the convolutional layer by combining the processing in the two modes.
  • a fourth invention is the invention according to any one of the first to third inventions, wherein the inner product processing unit executes a process of a fully connected layer, (1) The norm mode process is executed once for all connected layers to be processed, (2) The process in the inner product calculation mode is repeatedly executed for the number of outputs of all the connected layers to be processed.
  • the neural network processor can execute the processing of all connected layers by combining the processing in the two modes.
  • a fifth invention is a neural network processing method for executing a multivalued neural network process including a convolutional layer process and a fully connected layer process, comprising: a control step; a quantization processing step; Inner product processing step.
  • the control step sets a scaling coefficient vector which is real number vector data, and sets a multi-value basis matrix having multi-value data as elements.
  • the quantization step performs a quantization process on the feature map input to the convolutional layer and the feature vector input to the fully connected layer. Further, the quantization processing step sets an offset value such that a minimum value of the feature map and a minimum value of the feature vector are smaller than predetermined values, and sets a maximum value and a minimum value of the feature map and the feature vector. Is performed using the quantization width acquired based on the.
  • the inner product processing step executes (1) a norm mode for calculating the norm of the feature map and the feature vector, and (2) an inner product calculation process using the multi-valued basis matrix and the feature map or the feature vector after the quantization process. And an inner product operation mode.
  • the inner product processing step executes the process of the norm mode and the process of combining the inner product operation mode, thereby executing the processing of the convolutional layer and the processing of the fully connected layer.
  • a sixth invention is a program for causing a computer to execute the processing method for a neural network according to the fifth invention.
  • a neural network processor capable of mounting a high-performance compact model in a low-spec device (for example, an edge terminal) such as an embedded device or a mobile device without requiring re-learning, A neural network processing method and a program can be realized.
  • FIG. 1 is a schematic configuration diagram of a binary neural network processor 100 according to a first embodiment.
  • the schematic block diagram of the inner product processing part 3 which concerns on 1st Embodiment.
  • FIG. 9 is a diagram for explaining processing in an Offset mode.
  • FIG. 7 is a diagram for explaining processing in a Norm mode.
  • FIG. 4 is a diagram for explaining processing in a DP mode (inner product operation processing mode).
  • FIG. 2 is a diagram showing a CPU bus configuration.
  • FIG. 1 is a schematic configuration diagram of a binary neural network processor 100 according to the first embodiment.
  • FIG. 2 is a schematic configuration diagram of the inner product processing unit 3 according to the first embodiment.
  • the binary neural network processor 100 includes an input / output interface IF1, a control unit CPU1, an arithmetic processing unit PL1, and a bus B1, as shown in FIG.
  • the input / output interface IF1, the control unit CPU1, and the arithmetic processing unit PL1 are connected by a bus B1, as shown in FIG. 1, and input and output necessary data, commands, and the like via the bus B1.
  • a bus B1 as shown in FIG. 1
  • input and output necessary data, commands, and the like via the bus B1.
  • the input / output interface IF1 receives data Din to be processed from the outside, and outputs data including a processing result by the binary neural network processor to the outside as data Dout.
  • the control unit CPU1 performs overall control of the binarized neural network processor 100, control of each functional unit, and processes necessary for the binarized neural network processing.
  • the control unit CPU1 is realized by a CPU (Central Processing Unit) or a CPU core.
  • control unit CPU1 acquires (sets) a scaling coefficient vector v_c and a binary basis matrix M that approximate parameters (weighted data) of a learned model in a large-scale system, and acquires (sets) the acquired (set) scaling coefficient vector v_c.
  • binary basis matrix M are stored and held in the area CV and the area BinMtx0 / 1 of the internal RAM $ R1, respectively.
  • the scaling coefficient vector v_c and the binary basis matrix M may be externally input to the binary neural network processor 100 via the input / output interface IF1.
  • the arithmetic processing unit PL1 includes a DMA control unit 1, a quantization processing unit 2, an inner product processing unit 3, and an internal RAM $ R1.
  • the DMA controller 1 performs a DMA transfer process (DMA: Direct Memory Access).
  • DMA Direct Memory Access
  • the quantization processing unit 2 performs a quantization process on data of a feature map which is an input of a convolutional layer of DCNN (Deep Convolution Neural Network). Further, the quantization processing unit 2 performs a quantization process on the input data of the DCNN in all the connection layers.
  • DCNN Deep Convolution Neural Network
  • the inner product processing unit 3 includes an AND processing unit 31, a selector 32, a count processing unit 33, a microcode acquisition unit 34, and an ALU 35 (ALU: Arithmetic @ Logic @ Unit), as shown in FIG.
  • the AND processing unit 31 includes data D2 (for example, data of an integer part of a weight vector obtained from the internal RAM @ R1 (area BinMtx0 / 1)) and data D3 (for example, data obtained from the internal RAM @ R1 (area BinInT)). , Which is bit-separated and further subjected to a quantization process), performs an AND process on the data D2 and the data D3, and outputs the data including the execution result to the selector 32 as data D4. Output.
  • data D2 for example, data of an integer part of a weight vector obtained from the internal RAM @ R1 (area BinMtx0 / 1)
  • data D3 for example, data obtained from the internal RAM @ R1 (area BinInT)
  • the selector 32 inputs the data D2 and the data D4 and the signal dp_mode designating the mode.
  • the selector 32 selects one of the data D2 and the data D4 based on the signal dp_mode, and outputs the selected data to the count processing unit 33 as data D5.
  • the count processing unit 33 receives the data D5 output from the selector 32 and performs a count process on the data D5. Then, the count processing unit 33 outputs the data including the processing result to the ALU 35 as data D6.
  • the microcode acquisition unit 34 acquires a microcode ⁇ Code (for example, a microcode corresponding to a mode), and outputs the acquired microcode ⁇ Code to the ALU 35.
  • a mode for example, (1) Offset mode, (2) Norm mode, and (3) DP mode are set.
  • the “Offset mode” when performing a quantization process on a feature map input to the convolutional layer and a feature vector input to the fully connected layer, the minimum value of the feature map and the minimum value of the feature vector are This is a mode for executing a process of acquiring an offset value set to be smaller than a predetermined value.
  • the “Norm mode” is a mode for executing a process of calculating a norm of a feature map and a feature vector.
  • the “DP mode” is a mode for executing an inner product calculation process using a multivalued basis matrix and a feature map or a feature vector after the quantization process.
  • the ALU 35 includes data D1 (for example, data (scale coefficient vector) of a real part of a weight vector obtained from the internal RAM $ R1 (area CV)), data D6 output from the count processing unit 33, and a microcode obtaining unit.
  • the microcode ⁇ Code output from 34 is input.
  • the ALU 35 performs an arithmetic operation based on the microcode ⁇ Code, and outputs data including the result of the arithmetic operation as data Do.
  • ⁇ Internal RAM ⁇ R1 is a RAM (Random Access Memory) for storing and holding data necessary for executing the process for binarized neural network.
  • a CNN includes an input layer, a convolution layer (convolution layer), and a fully connected layer.
  • image data is input as input data Din to the input / output interface IF1 of the binarized neural network processor 100, image recognition processing is performed by the CNN, and the image recognition processing result is output to the outside as output data Dout.
  • the CNN performs a weighting operation on input data, and applies an activation function (for example, a ramp function (ReLU: Rectified @ Linear @ Unit)) to the processing result. , Sigmoid function, Softmax function, etc.), the output of the convolutional layer or the fully connected layer is obtained.
  • an activation function for example, a ramp function (ReLU: Rectified @ Linear @ Unit)
  • ReLU Rectified @ Linear @ Unit
  • Binarized-DCNN (Deep Convolution Neural Network) (hereinafter referred to as “BNN”) introduces a binary decomposition of a Quantization sub-layer and a coupling coefficient.
  • BNN Deep Convolution Neural Network
  • the operation between the binary values of BNN can be performed at high speed by a logical operation such as XOR or AND and a bit count.
  • the processing of the convolutional layer In the processing of the connection layer, by sharing a part where the same processing is executed, high-speed processing is realized while suppressing an increase in hardware scale.
  • the operation of the binarized neural network processor 100 will be described by dividing into “processing of the convolutional layer” and “processing of the fully connected layer”.
  • FIG. 3 is a diagram for explaining the process in the Offset mode.
  • FIG. 4 is a diagram for explaining processing in the Norm mode.
  • FIG. 5 is a diagram for explaining the processing in the DP mode (inner product calculation processing mode).
  • the binary neural network processor 100 executes processing using three modes: (1) Offset mode, (2) Norm mode, and (3) DP mode.
  • the quantization processing unit 2 of the binarized neural network processor 100 calculates the quantization width ⁇ d between the maximum value and the minimum value in the m-th (m: natural number) feature map z l ijm in the l-th layer (1: natural number).
  • ⁇ d ⁇ max (z l ijm ) ⁇ min (z l ijm ) ⁇ / (2 Q ⁇ 1) max (x): function for acquiring the maximum value of x min (x): function for acquiring the minimum value of x Q: acquired as the number of quantization bits.
  • the binary code z l ijm (b) ⁇ 0, 1 ⁇ (the feature map B ij r ij after the quantization process ) acquired as described above is stored and held in the area BinInT of the internal RAM.
  • the binarized neural network processor 100 executes the processing of the convolutional layer by processing corresponding to the following pseudo code.
  • ⁇ ⁇ Pseudo code for processing of convolutional layer For (number of outputs) Operate_offset (); // Offset restoration processing For (number of feature maps) Operate_Norm (); // Calculation of norm Processing equivalent to the second term on the right side of (Equation 2) For (number of outputs) Operate_dp (); // Dot product calculation Binary neural network processor 100 (1)
  • the above offset restoration process is executed in the process of the Offset mode, (2)
  • the above-described norm calculation process is executed in a Norm mode process, (3)
  • the above inner product calculation process is executed in the DP mode (inner product operation processing mode) process.
  • the data D2 is input to the selector 32.
  • the selector 32 receives the mode signal dp_mode whose signal value is set to “0”. The selector 32 selects the data D2 based on the mode signal dp_mode and outputs the data D2 to the count processing unit 33 as data D5. I do.
  • the count processing unit 33 outputs the input data D5 as it is to the ALU 35 as data D6.
  • the microcode acquisition unit 34 acquires the microcode ⁇ Code (Offset_mode) for the Offset mode, and outputs it to the ALU 35.
  • the ALU 35 receives the microcode ⁇ Code (Offset_mode) for the Offset mode output from the microcode acquisition unit 34, and performs an operation according to the microcode ⁇ Code (Offset_mode) for the Offset mode.
  • the above processing (offset restoration processing) is executed for the number of outputs of the convolutional layer.
  • the data D3 is a feature map B ij r ij after the quantization process, and is stored and held in the area BinInT of the internal RAM.
  • the AND processing unit 31 In the Norm mode, the AND processing unit 31 outputs the input data D3 to the selector 32 as it is as data D4.
  • the selector 32 receives the mode signal dp_mode whose signal value is set to “1”. The selector 32 selects the data D4 based on the mode signal dp_mode, and outputs the data D4 to the count processing unit 33 as data D5. I do.
  • the microcode obtaining unit 34 obtains the microcode ⁇ Code (Norm_mode) for the Norm mode and outputs it to the ALU 35.
  • the Norm mode microcode ⁇ Code is a code that causes the ALU 35 to execute a process of directly outputting the data input from the count processing unit 33.
  • the ALU 35 receives the Norm mode microcode ⁇ Nord (Norm_mode) output from the microcode acquisition unit 34 and performs an operation according to the Norm mode microcode ⁇ Nord (Norm_mode).
  • BITCNT (B ij r ij ) corresponds to the norm of the feature map B ij r ij after the quantization processing.
  • the above processing is executed for the number of feature maps of the convolutional layer to be processed.
  • the data D2 is data M n T of a binary basis matrix stored and held in the area BinMtx0 / 1 of the internal RAM.
  • the data D3 is a feature map B ij r ij after the quantization processing, and is stored and held in the area BinInT of the internal RAM.
  • the AND process is a process of, when the value of an element is “ ⁇ 1”, replacing the “ ⁇ 1” with “0” to obtain a logical product.
  • the selector 32 receives the mode signal dp_mode whose signal value is set to “1”. The selector 32 selects the data D4 based on the mode signal dp_mode, and outputs the data D4 to the count processing unit 33 as data D5. I do.
  • the microcode obtaining unit 34 obtains the microcode ⁇ Code (DP_mode) for the DP mode and outputs it to the ALU 35.
  • the microcode ⁇ Code (DP_mode) for the DP mode is, for example, a code for causing the ALU 35 to execute the following processing.
  • the ALU 35 receives the DP mode microcode ⁇ DP (DP_mode) output from the microcode acquisition unit 34 and performs an operation according to the DP mode microcode ⁇ Code (DP_mode).
  • DP_mode DP mode microcode ⁇ DP
  • the above processing is executed for each feature map of the convolutional layer to be processed by the number of outputs of the convolutional layer.
  • the above processing result is, for example, stored and held in a predetermined area of the internal RAM # R1, or output to the control unit CPU1, and the control unit CPU1 executes a predetermined process using the processing result.
  • the binarized neural network processor 100 can execute the processing of the convolutional layer. That is, in the binarized neural network processor 100, the data required to obtain y ijn of (Equation 1) can be obtained by the processing in the above three modes, and as a result, the processing of the convolutional layer Can be performed.
  • the acquired binary code z l i (b) ⁇ ⁇ 0,1 ⁇ ( feature vector B ij r ij after quantization process) as is stored and held in the area BinInT internal RAM.
  • the binarized neural network processor 100 executes the processing of all the connected layers by processing corresponding to the following pseudo code.
  • ⁇ ⁇ Pseudo code for processing all connected layers ⁇ Operate_Norm (); // Calculation of norm Processing equivalent to the second term on the right side of (Equation 2) For (number of outputs) Operate_offset (); // Offset restoration processing Operate_dp (); // Inner product calculation
  • the binarized neural network processor 100 (1) The above-described norm calculation process is executed in a Norm mode process, (2) The above-described offset restoration processing is executed as processing in the Offset mode (3) The above inner product calculation process is executed in the DP mode (inner product operation processing mode) process.
  • the data D3 is the feature vector B ij r ij after the quantization process, and is stored and held in the area BinInT of the internal RAM.
  • the AND processing unit 31 In the Norm mode, the AND processing unit 31 outputs the input data D3 to the selector 32 as it is as data D4.
  • the selector 32 receives the mode signal dp_mode whose signal value is set to “1”. The selector 32 selects the data D4 based on the mode signal dp_mode, and outputs the data D4 to the count processing unit 33 as data D5. I do.
  • the microcode obtaining unit 34 obtains the microcode ⁇ Code (Norm_mode) for the Norm mode and outputs it to the ALU 35.
  • the Norm mode microcode ⁇ Code is a code that causes the ALU 35 to execute a process of directly outputting the data input from the count processing unit 33.
  • the ALU 35 receives the Norm mode microcode ⁇ Nord (Norm_mode) output from the microcode acquisition unit 34 and performs an operation according to the Norm mode microcode ⁇ Nord (Norm_mode).
  • BITCNT (B ij r ij ) corresponds to the norm of the feature vector B ij r ij after the quantization processing.
  • the data D2 is input to the selector 32.
  • the selector 32 receives the mode signal dp_mode whose signal value is set to “0”. The selector 32 selects the data D2 based on the mode signal dp_mode and outputs the data D2 to the count processing unit 33 as data D5. I do.
  • the count processing unit 33 outputs the input data D5 as it is to the ALU 35 as data D6.
  • the microcode acquisition unit 34 acquires the microcode ⁇ Code (Offset_mode) for the Offset mode, and outputs it to the ALU 35.
  • the ALU 35 receives the microcode ⁇ Code (Offset_mode) for the Offset mode output from the microcode acquisition unit 34, and performs an operation according to the microcode ⁇ Code (Offset_mode) for the Offset mode.
  • the data D2 is data M n T of a binary basis matrix stored and held in the area BinMtx0 / 1 of the internal RAM.
  • the data D3 is a feature map B ij r ij after the quantization processing, and is stored and held in the area BinInT of the internal RAM.
  • the AND process is a process of, when the value of an element is “ ⁇ 1”, replacing the “ ⁇ 1” with “0” to obtain a logical product.
  • the selector 32 receives the mode signal dp_mode whose signal value is set to “1”. The selector 32 selects the data D4 based on the mode signal dp_mode, and outputs the data D4 to the count processing unit 33 as data D5. I do.
  • the microcode obtaining unit 34 obtains the microcode ⁇ Code (DP_mode) for the DP mode and outputs it to the ALU 35.
  • the microcode ⁇ Code (DP_mode) for the DP mode is, for example, a code for causing the ALU 35 to execute the following processing.
  • the ALU 35 receives the DP mode microcode ⁇ DP (DP_mode) output from the microcode acquisition unit 34 and performs an operation according to the DP mode microcode ⁇ Code (DP_mode).
  • DP_mode DP mode microcode ⁇ DP
  • the above processing is executed for the number of outputs of the fully connected layer.
  • the above processing result is, for example, stored and held in a predetermined area of the internal RAM # R1, or output to the control unit CPU1, and the control unit CPU1 executes a predetermined process using the processing result.
  • the binarized neural network processor 100 can execute the processing of all the connected layers. That is, in the binarized neural network processor 100, data necessary for obtaining y ijn of (Equation 1) can be obtained by the processing in the above three modes, and as a result, Processing can be performed.
  • the binarized neural network processor 100 in the processing of the convolutional layer and the processing of the fully connected layer, the part where the same processing is executed is shared, and the three modes ((1) Offset mode, The processing of (2) Norm mode and (3) DP mode) is executed by processing using microcode corresponding to each mode.
  • the processing of the different parts in the processing of the convolutional layer and the processing of the fully connected layer is realized by combining the above three modes of processing in an appropriate order. Therefore, the binary neural network processor 100 can execute BNN processing at high speed while suppressing an increase in hardware scale.
  • the binarized neural network processor 100 converts the binarized data from js has been described, but the present invention is not limited to this, and the method of the present invention is applied to multi-valued data.
  • the present invention may be applied to realize a multi-valued neural network processor.
  • the binarized neural network processor 100 executes processing in three modes ((1) Offset mode, (2) Norm mode, and (3) DP mode) has been described. It is not limited to this.
  • the binarized neural network processor 100 executes processing in (1) Norm mode and (2) DP mode, and the processing in the DP mode includes the processing in the Offset mode described in the above embodiment. You may do so.
  • the binarized neural network processor 100 obtains a value obtained in the Offset mode by calculation in advance, holds the obtained value, and executes processing using the value when executing the DP mode. It may be. Thereby, in the binarized neural network processor 100, the processing in the Norm mode and the processing in the DP mode can be executed continuously without intervention of the CPU.
  • the present invention is not limited to this.
  • the activation function Processing for example, processing of a ReLU function
  • the processing of the activation function may be executed by the inner product processing unit 3 and the control unit CPU1.
  • the number of internal RAMs has been described without particular limitation.
  • the internal RAM may be configured by a plurality of RAMs, or may be an external RAM of a binary neural network processor.
  • the processing of the above-described embodiment may be executed using a RAM (for example, a DRAM) provided in the CPU.
  • the data represented by the scalar, the vector, and the matrix are examples, and are not limited to the above.
  • the binarized neural network processor 100 may execute the same processing as described above as scalar, vector, and tensor data.
  • Each block (each functional unit) of the binarized neural network processor 100 described in the above embodiment may be individually formed into a single chip by a semiconductor device such as an LSI, or may be configured to include a part or the entirety. It may be made into a chip.
  • Each block (each functional unit) of the binary neural network processor 100 described in the above embodiment may be realized by a semiconductor device such as a plurality of LSIs.
  • LSI LSI
  • IC system LSI
  • super LSI ultra LSI depending on the degree of integration
  • the method of circuit integration is not limited to LSI, but may be realized by a dedicated circuit or a general-purpose processor. After manufacturing the LSI, a programmable FPGA (Field Programmable Gate Array) or a reconfigurable processor capable of reconfiguring connection and setting of circuit cells inside the LSI may be used.
  • a programmable FPGA Field Programmable Gate Array
  • a reconfigurable processor capable of reconfiguring connection and setting of circuit cells inside the LSI may be used.
  • Part or all of the processing of each functional block in each of the above embodiments may be realized by a program. Part or all of the processing of each functional block in each of the above embodiments is performed by a central processing unit (CPU) in a computer. Further, programs for performing the respective processes are stored in a storage device such as a hard disk, a ROM, or the like, and are executed by being read from the ROM or from the RAM.
  • a program Part or all of the processing of each functional block in each of the above embodiments is performed by a central processing unit (CPU) in a computer.
  • programs for performing the respective processes are stored in a storage device such as a hard disk, a ROM, or the like, and are executed by being read from the ROM or from the RAM.
  • the processes of the above embodiments may be realized by hardware, or may be realized by software (including a case where the processes are realized together with an OS (operating system), middleware, or a predetermined library). Further, it may be realized by mixed processing of software and hardware.
  • OS operating system
  • middleware middleware
  • predetermined library a predetermined library
  • each functional unit of the above-described embodiment is implemented by software
  • the hardware configuration for example, a CPU, a ROM, a RAM, an input unit, and an output unit
  • Each functional unit may be realized by software processing using a connected hardware configuration).
  • the execution order of the processing method in the above embodiment is not necessarily limited to the description in the above embodiment, and the execution order can be changed without departing from the gist of the invention.
  • a computer program that causes a computer to execute the above-described method and a computer-readable recording medium that records the program are included in the scope of the present invention.
  • the computer-readable recording medium include a flexible disk, hard disk, CD-ROM, MO, DVD, DVD-ROM, DVD-RAM, large-capacity DVD, next-generation DVD, and semiconductor memory. .
  • the computer program is not limited to the one recorded on the recording medium, and may be transmitted via an electric communication line, a wireless or wired communication line, a network represented by the Internet, or the like.
  • circuitry may be realized in whole or in part by hardware, software, or a mixture of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Neurology (AREA)
  • Complex Calculations (AREA)

Abstract

学習を必要とせず、組み込み機器やモバイル機器等の低スペックのデバイスにおいて、高性能なコンパクト化したモデルを搭載することができるニューラルネットワーク用プロセッサを実現する。ニューラルネットワーク用プロセッサ(100)では、畳み込み層の処理と、全結合層の処理において、同様の処理が実行される部分を共通化し、ノルムモード、内積演算モードの処理を組み合わせた処理を実行することで、畳み込み層の処理と全結合層の処理とを実行することができる。したがって、ニューラルネットワーク用プロセッサ(100)では、ハードウェア規模の増大を抑制しつつ、多値化ニューラルネットワーク用処理を高速に実行することができる。

Description

ニューラルネットワーク用プロセッサ、ニューラルネットワーク用処理方法、および、プログラム
 本発明は、ニューラルネットワークの技術に関する。
 近年、ニューラルネットワーク技術の1つである、CNN(Convolutional Neural Network)を用いた多様な技術が開発されている(例えば、特許文献1を参照)。CNNの中でも、中間層を多く設けたDCNN(Deep Convolutional Neural Network)を用いた技術が、多様な分野で成果を上げているため、特に注目を集めている。
特開2015-197702号公報
 DCNNは、一般物体認識やセマンティックセグメンテーション等の様々なタスクにおいて高い認識性能を実現している。その一方で、DCNNは、処理を実行するために必要な計算量とパラメータ数が非常に多いため、処理を実行するときに、膨大な処理時間と多大なメモリ量が必要となる。
 また、DCNNでは、層をより深くすることで認識精度が向上する傾向が見られ、これに伴い識別時間(処理時間)に加えモデルサイズも増加するという問題が発生する。組み込み機器やモバイル機器等の低スペックのデバイスでDCNNを使用するには、識別計算の高速化とモデルサイズの圧縮が大きな課題となる。
 つまり、組み込み機器やモバイル機器等の低スペックのデバイス(例えば、エッジ端末)において、大規模システムで学習し取得した学習済みモデルをそのまま搭載することは困難であり、低スペックのデバイスにおいて、コンパクト化したモデルを構築する必要がある。
 組み込み機器やモバイル機器等の低スペックのデバイス(例えば、エッジ端末)に、大規模システムで学習し取得した学習済みモデルを搭載するためには、低スペックのデバイスにおいて、当該学習済みモデルのコンパクト化したモデルを構築し、当該学習済みモデルに用いた学習用データを用いて、再度、コンパクト化したモデルにおいて、学習させる必要がある(この学習を「再学習」という)。
 つまり、組み込み機器やモバイル機器等の低スペックのデバイス(例えば、エッジ端末)で、大規模システムで学習し取得した学習済みモデルを搭載するためには、再学習が必要となるという課題がある。
 そこで、本発明は、上記課題に鑑み、再学習を必要とせず、組み込み機器やモバイル機器等の低スペックのデバイス(例えば、エッジ端末)において、高性能なコンパクト化したモデルを搭載することができるニューラルネットワーク用プロセッサ、ニューラルネットワーク用データ処理方法、および、プログラムを実現することを目的とする。
 上記課題を解決するために、第1の発明は、畳み込み層の処理と全結合層の処理とを含む多値化ニューラルネットワーク用処理を実行するためのニューラルネットワーク用プロセッサであって、制御部と、量子化処理部と、内積処理部と、を備える。
 制御部は、実数ベクトルデータであるスケーリング係数ベクトルを設定するとともに、多値データを要素とする多値基底行列を設定する。
 量子化処理部は、畳み込み層に入力される特徴マップおよび全結合層に入力される特徴ベクトルに対して量子化処理を実行する。また、量子化処理部は、特徴マップの最小値および特徴ベクトルの最小値が所定の値よりも小さい値となるようにオフセット値を設定し、特徴マップおよび特徴ベクトルの最大値および最小値に基づいて取得される量子化幅を用いて量子化処理を実行する。
 内積処理部は、(1)特徴マップおよび特徴ベクトルのノルムを算出するノルムモードと、(2)多値基底行列と量子化処理後の特徴マップまたは特徴ベクトルとを用いた内積演算処理を実行する内積演算モードとを有する。内積処理部は、ノルムモードの処理、および、内積演算モードを組み合わせた処理を実行することで、畳み込み層の処理と全結合層の処理とを実行する。
 このニューラルネットワーク用プロセッサでは、畳み込み層の処理と、全結合層の処理において、同様の処理が実行される部分を共通化し、2つのモード((1)ノルムモード、(2)内積演算モード)の処理を組み合わせた処理を実行することで、畳み込み層の処理と全結合層の処理とを実行することができる。したがって、このニューラルネットワーク用プロセッサでは、ハードウェア規模の増大を抑制しつつ、ニューラルネットワーク用処理を高速に実行することができる。
 第2の発明は、第1の発明であって、内積処理部は、ノルムモード用マイクロコードと、内積演算モード用マイクロコードとを取得するマイクロコード取得部と、マイクロコードに基づいて、算術演算処理を実行する算術演算処理部と、を備える。
(1)ノルムモードに設定されている場合、
 マイクロコード取得部は、ノルムモード用マイクロコードを取得し、算術演算処理部は、ノルムモード用マイクロコードに基づいて、算術演算処理を実行する。
(2)内積演算モードに設定されている場合、
 マイクロコード取得部は、内積演算モード用マイクロコードを取得し、算術演算処理部は、内積演算モード用マイクロコードに基づいて、算術演算処理を実行する。
 このニューラルネットワーク用プロセッサでは、畳み込み層の処理と、全結合層の処理において、同様の処理が実行される部分を共通化し、2つのモード((1)ノルムモード、(2)内積演算モード)の処理を、各モードに対応するマイクロコードにより処理することで実行する。そして、このニューラルネットワーク用プロセッサでは、畳み込み層の処理と全結合層の処理とにおいて、相違する部分の処理を、上記の2つのモードの処理を適切な順序で組み合わせることで実現する。したがって、このニューラルネットワーク用プロセッサでは、ハードウェア規模の増大を抑制しつつ、ニューラルネットワーク用処理を高速に実行することができる。
 第3の発明は、第1または第2の発明であって、内積処理部は、畳み込み層の処理を実行する場合、
(1)ノルムモードの処理を、処理対象の畳み込み層の特徴マップ数分繰り返し実行し、
(2)内積演算モードの処理を、各特徴マップについてノルムモードの処理が実行されるごとに、処理対象の畳み込み層の出力数分繰り返し実行する。
 これにより、このニューラルネットワーク用プロセッサでは、2つのモードによる処理を組み合わせることで、畳み込み層の処理を実行することができる。
 第4の発明は、第1から第3のいずれかの発明であって、内積処理部は、全結合層の処理を実行する場合、
(1)処理対象の全結合層につき、ノルムモードの処理を1回実行し、
(2)内積演算モードの処理を、処理対象の全結合層の出力数分繰り返し実行する。
 これにより、このニューラルネットワーク用プロセッサでは、2つのモードによる処理を組み合わせることで、全結合層の処理を実行することができる。
 第5の発明は、畳み込み層の処理と全結合層の処理とを含む多値化ニューラルネットワーク用処理を実行するためのニューラルネットワーク用処理方法であって、制御ステップと、量子化処理ステップと、内積処理ステップと、を備える。
 制御ステップは、実数ベクトルデータであるスケーリング係数ベクトルを設定するとともに、多値データを要素とする多値基底行列を設定する。
 量子化処理ステップは、畳み込み層に入力される特徴マップおよび全結合層に入力される特徴ベクトルに対して量子化処理を実行する。また、量子化処理ステップは、特徴マップの最小値および特徴ベクトルの最小値が所定の値よりも小さい値となるようにオフセット値を設定し、前記特徴マップおよび前記特徴ベクトルの最大値および最小値に基づいて取得される量子化幅を用いて量子化処理を実行する。
 内積処理ステップは、(1)特徴マップおよび特徴ベクトルのノルムを算出するノルムモードと、(2)多値基底行列と量子化処理後の特徴マップまたは特徴ベクトルとを用いた内積演算処理を実行する内積演算モードとを有する。内積処理ステップは、ノルムモードの処理、および、内積演算モードを組み合わせた処理を実行することで、畳み込み層の処理と全結合層の処理とを実行する。
 これにより、第1の発明と同様の効果を奏するニューラルネットワーク用処理方法を実現させることができる。
 第6の発明は、第5の発明であるニューラルネットワーク用処理方法をコンピュータに実行させるためのプログラムである。
 これにより、第1の発明と同様の効果を奏するニューラルネットワーク用処理方法をコンピュータに実行させるためのプログラムを実現させることができる。
 本発明によれば、再学習を必要とせず、組み込み機器やモバイル機器等の低スペックのデバイス(例えば、エッジ端末)において、高性能なコンパクト化したモデルを搭載することができるニューラルネットワーク用プロセッサ、ニューラルネットワーク用処理方法、および、プログラムを実現することができる。
第1実施形態に係る二値化ニューラルネットワーク用プロセッサ100の概略構成図。 第1実施形態に係る内積処理部3の概略構成図。 Offsetモードの処理を説明するための図。 Normモードの処理を説明するための図。 DPモード(内積演算処理モード)の処理を説明するための図。 CPUバス構成を示す図。
 [第1実施形態]
 第1実施形態について、図面を参照しながら、以下、説明する。
 <1.1:二値化ニューラルネットワーク用プロセッサの構成>
 図1は、第1実施形態に係る二値化ニューラルネットワーク用プロセッサ100の概略構成図である。
 図2は、第1実施形態に係る内積処理部3の概略構成図である。
 二値化ニューラルネットワーク用プロセッサ100は、図1に示すように、入出力インターフェースIF1と、制御部CPU1と、演算処理部PL1と、バスB1とを備える。入出力インターフェースIF1と、制御部CPU1と、演算処理部PL1とは、図1に示すように、バスB1により接続されており、必要なデータ、コマンド等を、バスB1を介して、入出力することができる。なお、上記機能部の一部または全部は、バス接続ではなく、必要に応じて、直接接続されるものであってもよい。
 入出力インターフェースIF1は、外部から処理対象となるデータDinを入力し、二値化ニューラルネットワーク用プロセッサにより処理結果を含むデータをデータDoutとして外部に出力する。
 制御部CPU1は、二値化ニューラルネットワーク用プロセッサ100の全体制御、各機能部の制御および二値化ニューラルネットワーク用処理に必要な処理を行う。制御部CPU1は、CPU(Central Processing Unit)やCPUコアにより実現される。
 制御部CPU1は、例えば、大規模システムでの学習済みモデルのパラメータ(重み付けデータ)を近似するスケーリング係数ベクトルv_cおよび二値基底行列Mを取得(設定)し、取得(設定)したスケーリング係数ベクトルv_cおよび二値基底行列Mを、それぞれ、内部RAM R1の領域CV、および領域BinMtx0/1に記憶保持させる。
 なお、上記スケーリング係数ベクトルv_cおよび二値基底行列Mは、入出力インターフェースIF1を介して、外部から、二値化ニューラルネットワーク用プロセッサ100に入力されるものであってもよい。
 演算処理部PL1は、図1に示すように、DMA制御部1と、量子化処理部2と、内積処理部3と、内部RAM R1と、を備える。
 DMA制御部1は、DMA転送処理(DMA:Direct Memory Access)を行う。
 量子化処理部2は、DCNN(Deep Convolution Neural Network)の畳み込み層の入力である特徴マップのデータに対して、量子化処理を行う。また、量子化処理部2は、DCNNの全結合層の入力データに対して、量子化処理を行う。
 内積処理部3は、図2に示すように、AND処理部31と、セレクタ32と、カウント処理部33と、マイクロコード取得部34と、ALU35(ALU:Arithmetic Logic Unit)と、を備える。
 AND処理部31は、データD2(例えば、内部RAM R1(領域BinMtx0/1)から取得される重みベクトルの整数部のデータ)とデータD3(例えば、内部RAM R1(領域BinInT)から取得されるデータであって、ビット分解され、さらに量子化処理が実行されたデータ)とを入力し、データD2とデータD3とに対してAND処理を実行し、実行結果を含むデータをデータD4としてセレクタ32に出力する。
 セレクタ32は、データD2とデータD4と、モードを指示する信号dp_modeとを入力する。セレクタ32は、信号dp_modeに基づいて、データD2およびデータD4のいずれか一方を選択し、選択したデータをデータD5としてカウント処理部33に出力する。
 カウント処理部33は、セレクタ32から出力されるデータD5を入力し、データD5に対してカウント処理を実行する。そして、カウント処理部33は、処理結果を含むデータをデータD6として、ALU35に出力する。
 マイクロコード取得部34は、マイクロコードμCode(例えば、モードに応じたマイクロコード)を取得し、取得したマイクロコードμCodeをALU35に出力する。モードとして、例えば、(1)Offsetモード、(2)Normモード、(3)DPモードが設定される。
 なお、「Offsetモード」は、畳み込み層に入力される特徴マップおよび全結合層に入力される特徴ベクトルに対して量子化処理を実行する場合において、特徴マップの最小値および特徴ベクトルの最小値が所定の値よりも小さい値となるように設定されるオフセット値を取得する処理を実行するためのモードである。
 「Normモード」は、特徴マップおよび特徴ベクトルのノルムを算出する処理を実行するためのモードである。
 「DPモード」は、多値基底行列と量子化処理後の特徴マップまたは特徴ベクトルとを用いた内積演算処理を実行するためのモードである。
 ALU35は、データD1(例えば、内部RAM R1(領域CV)から取得される重みベクトルの実数部のデータ(スケール係数ベクトル))と、カウント処理部33から出力されるデータD6と、マイクロコード取得部34から出力されるマイクロコードμCodeとを入力する。ALU35は、マイクロコードμCodeに基づいて、算術演算を行い、当該算術演算の結果を含むデータをデータDoとして出力する。
 内部RAM R1は、二値化ニューラルネットワーク用処理を実行するために必要なデータを記憶保持するためのRAM(Random Access Memory)である。
 <1.2:二値化ニューラルネットワーク用プロセッサの動作>
 以上のように構成された二値化ニューラルネットワーク用プロセッサ100の動作について、以下、説明する。
 一般に、CNNでは、入力層と、畳み込み層(コンボリューション層)と、全結合層とを含む。例えば、二値化ニューラルネットワーク用プロセッサ100の入出力インターフェースIF1に、入力データDinとして、画像データが入力され、CNNによる画像認識処理が実行され、画像認識処理結果が出力データDoutとして外部に出力される。
 CNNでは、畳み込み層の処理、あるいは、全結合層の処理において、入力データに対して重み演算処理が実行され、当該処理結果に対して活性化関数(例えば、ランプ関数(ReLU:Rectified Linear Unit)、シグモイド関数、Softmax関数等)により処理が実行されることで、畳み込み層あるいは全結合層の出力が得られる。
 また、下記先行技術文献Aに開示されているように、Binarized-DCNN(DCNN:Deep Convolution Neural Network)(以下、「BNN」という)では、Quantization sub-layerと結合係数の二値分解を導入し、実数同士の内積計算を二値同士の内積計算に置換することで、既存のネットワークモデルに対して再学習なしに識別計算の高速化およびモデルサイズの圧縮を実現することができる。BNNの二値同士の演算は、XORやAND等の論理演算とビットカウントにより高速な演算が可能となる。
(先行技術文献A):
  神谷龍司等 “Binarized-DCNNによる識別計算の高速化とモデル圧縮” 信学技報 116(366), 47-52, 2016-12-15 電子情報通信学会
 上記先行技術文献Aの開示に基づいて、BNNの識別計算の基本式を、下記(数式1)のように導出することができる。
(数式1):
  yijn=c ijij+min(x)Offset
  yijn:n番目の特徴マップの出力(特徴マップの座標(i,j)の出力値)
  c :n番目の特徴マップのスケール係数ベクトルcの転置行列
  M :n番目の特徴マップの二値基底行列の転置行列
  Bijij:二値特徴マップ(量子化後の二値特徴マップ)   
  min(x):n番目の特徴マップの各要素の値のうちの最小値
  Offset:Offsetモードで取得される結果
 また、M ∈{-1,1}とBijij∈{-1,1}とは二値であるため、下記(数式2)を用いて論理演算とビットカウントで計算することができる。
(数式2):
  M ijij
  =2×BITCNT(AND(M ,Bijij))-Norm(z)
  z=Bijij
  Norm(z):zのノルムを取得する関数
  BITCNT(x):バイナリコードxにおいて、「1」であるビット数をカウントする関数
 二値化ニューラルネットワーク用プロセッサ100では、畳み込み層の処理と、全結合層の処理において、同様の処理が実行される部分を共通化することで、ハードウェア規模の増大を抑制しつつ、高速処理を実現させる。
 以下では、「畳み込み層の処理」と「全結合層の処理」とに分けて、二値化ニューラルネットワーク用プロセッサ100の動作について説明する。
 図3は、Offsetモードの処理を説明するための図である。
 図4は、Normモードの処理を説明するための図である。
 図5は、DPモード(内積演算処理モード)の処理を説明するための図である。
 二値化ニューラルネットワーク用プロセッサ100では、(1)Offsetモード、(2)Normモード、(3)DPモードの3つのモードを用いて、処理が実行される。
 (1.2.1:畳み込み層の処理)
 まず、畳み込み層の処理について、説明する。
 二値化ニューラルネットワーク用プロセッサ100の量子化処理部2は、第l層(l:自然数)におけるm番目(m:自然数)の特徴マップz ijmにおける最大値-最小値間の量子化幅Δdを、
  Δd={max(z ijm)-min(z ijm)}/(2-1)
  max(x):xの最大値を取得する関数
  min(x):xの最小値を取得する関数
  Q:量子化ビット数
として取得する。
 そして、量子化処理部2は、特徴マップの最小値が0となるように値をシフトさせる。つまり、量子化処理部2は、
  z ijm’={z ijm-min(z ijm)}/Q
に相当する処理を実行し、さらに、上記数式により取得された値を四捨五入して整数値に丸め量子化する。さらに、量子化処理部2は、丸め量子化により取得された値に対して、二値化処理をすることで、バイナリコードz ijm (b)∈{0,1}を取得する。
 上記のようにして取得されたバイナリコードz ijm (b)∈{0,1}(量子化処理後の特徴マップBijij)は、内部RAMの領域BinInTに記憶保持される。
 畳み込み層の処理において、以下のことが成り立つ。
(1)量子化処理後の特徴マップBijijは、特徴マップごとに変化する(入れ替わる)。
(2)上記(数式1)の右辺の第2項、すなわち、min(x)Offsetの値は、特徴マップに関わらず、一定である。
 二値化ニューラルネットワーク用プロセッサ100では、上記を考慮して、畳み込み層の処理を以下の疑似コードに相当する処理により実行する。
≪畳み込み層の処理の擬似コード≫
For (出力数)
   Operate_offset();     // オフセット復元処理
For (特徴マップ数)
   Operate_Norm();    // ノルムの計算 (数式2)の右辺の第2項に相当する処理
      For (出力数)
         Operate_dp();   // 内積計算
 二値化ニューラルネットワーク用プロセッサ100は、
(1)上記のオフセット復元処理をOffsetモードの処理で実行し、
(2)上記のノルム計算の処理をNormモードの処理で実行し、
(3)上記の内積計算の処理をDPモード(内積演算処理モード)の処理で実行する。
 以下、これについて、説明する。
 (1.2.1.1:Offsetモードの処理(畳み込み層の処理))
 Offsetモードの処理について、説明する。
 図3に示すように、データD2が、セレクタ32に入力される。
 セレクタ32では、信号値が「0」に設定されたモード信号dp_modeが入力されており、セレクタ32は、当該モード信号dp_modeに基づいて、データD2を選択し、データD5としてカウント処理部33に出力する。
 カウント処理部33は、Offsetモードにおいて、入力データD5を、そのまま、データD6として、ALU35に出力する。
 マイクロコード取得部34は、Offsetモード用のマイクロコードμCode(Offset_mode)を取得し、ALU35に出力する。なお、Offsetモード用のマイクロコードμCode(Offset_mode)は、例えば、以下の処理をALU35に実行させるコードである。
(1)min(x)のロード(読み出し)
(2)データD1(=c )と、データD6(=M )と、min(x)との乗算処理
 なお、min(x)は、量子化処理が実行されるときに取得した値を、例えば、内部RAM R1に記憶保持しておき、マイクロコード取得部34が、min(x)のデータを、内部RAM R1から読み出すようにしてもよい。
 ALU35は、図3に示すように、データD1(=c )とデータD6(=M )とを入力する。なお、データD1(=c )は、内部RAMの領域CVに記憶保持されているスケール係数ベクトルのデータc である。
 また、ALU35は、マイクロコード取得部34から出力されるOffsetモード用のマイクロコードμCode(Offset_mode)を入力し、当該Offsetモード用のマイクロコードμCode(Offset_mode)に従って演算を行う。
 つまり、ALU35は、
(1)min(x)のロード(読み出し)
(2)データD1(=c )と、データD6(=M )と、min(x)との乗算処理
を実行することで、出力データDo(=min(x)Offset)を取得する。
 以上のように処理することで、上記(数式1)の右辺の第2項、すなわち、min(x)Offsetの値(オフセット値)を取得することができる。
 畳み込み層の処理では、上記処理(オフセット復元処理)が、畳み込み層の出力数分、実行される。
 (1.2.1.2:Normモードの処理(畳み込み層の処理))
 Normモードの処理について、説明する。
 図4に示すように、データD3(=Bijij)が、AND処理部31に入力される。なお、データD3は、量子化処理後の特徴マップBijijであり、内部RAMの領域BinInTに記憶保持されている。
 AND処理部31は、Normモードでは、入力データD3を、そのまま、データD4として、セレクタ32に出力する。
 セレクタ32では、信号値が「1」に設定されたモード信号dp_modeが入力されており、セレクタ32は、当該モード信号dp_modeに基づいて、データD4を選択し、データD5としてカウント処理部33に出力する。
 カウント処理部33は、入力データD5に対してカウント処理(BITCNT関数による処理)を実行し、処理結果をデータD6(=BITCNT(Bijij))としてALU35に出力する。
 マイクロコード取得部34は、Normモード用のマイクロコードμCode(Norm_mode)を取得し、ALU35に出力する。なお、Normモード用のマイクロコードμCode(Norm_mode)は、カウント処理部33から入力されたデータをそのまま出力させる処理をALU35に実行させるコードである。
 ALU35は、図4に示すように、カウント処理部33から出力されるデータD6(=BITCNT(Bijij))を入力する。
 また、ALU35は、マイクロコード取得部34から出力されるNormモード用のマイクロコードμCode(Norm_mode)を入力し、当該Normモード用のマイクロコードμCode(Norm_mode)に従って演算を行う。
 つまり、ALU35は、カウント処理部33から入力されたデータをそのまま出力させる処理を行い、データDo(=BITCNT(Bijij))を出力する。なお、BITCNT(Bijij)は、量子化処理後の特徴マップBijijのノルムに相当する。
 以上のように処理することで、上記(数式2)の右辺の第2項、すなわち、Norm(z)(z=Bijij)の値(ノルム)を取得することができる。
 畳み込み層の処理では、上記処理(ノルム算出処理)が、処理対象となっている畳み込み層の特徴マップ数分、実行される。
 (1.2.1.3:DPモードの処理(畳み込み層の処理))
 DPモードの処理について、説明する。
 図5に示すように、データD2(=M )およびデータD3(=Bijij)が、AND処理部31に入力される。
 データD2は、内部RAMの領域BinMtx0/1に記憶保持されている二値基底行列のデータM である。
 データD3は、量子化処理後の特徴マップBijijであり、内部RAMの領域BinInTに記憶保持されている。
 AND処理部31は、データD2およびデータD3に対してAND処理を実行し、処理結果を含むデータをデータD4(=AND(M ,Bijij))として、セレクタ32に出力する。なお、AND処理は、要素の値が「-1」である場合、当該「-1」を「0」に置換して論理積をとる処理である。
 セレクタ32では、信号値が「1」に設定されたモード信号dp_modeが入力されており、セレクタ32は、当該モード信号dp_modeに基づいて、データD4を選択し、データD5としてカウント処理部33に出力する。
 カウント処理部33は、入力データD5に対してカウント処理(BITCNT関数による処理)を実行し、処理結果をデータD6(=BITCNT(AND(M ,Bijij)))としてALU35に出力する。
 マイクロコード取得部34は、DPモード用のマイクロコードμCode(DP_mode)を取得し、ALU35に出力する。なお、DPモード用のマイクロコードμCode(DP_mode)は、例えば、以下の処理をALU35に実行させるコードである。
(1)D6×2の処理(1ビット左にシフトさせる処理)
(2)上記(1)の結果からノルムを減算する処理
(3)上記(2)の結果に、データD1(=c )を乗算する処理
 ALU35は、図5に示すように、データD1(=c )とデータD6(=BITCNT(AND(M ,Bijij)))とを入力する。なお、データD1(=c )は、内部RAMの領域CVに記憶保持されているスケール係数ベクトルのデータc である。
 また、ALU35は、マイクロコード取得部34から出力されるDPモード用のマイクロコードμCode(DP_mode)を入力し、当該DPモード用のマイクロコードμCode(DP_mode)に従って演算を行う。
 つまり、ALU35は、
(1)D6×2の処理(1ビット左にシフトさせる処理)
(2)上記(1)の結果からノルムを減算する処理(2×D6―Norm(z))
(3)上記(2)の結果に、データD1(=c )を乗算する処理
を実行することで、出力データDo(=c ijij)を取得する。
 つまり、上記により、下記に相当する処理が実行される。
  Do=c ijij
  M ijij=2×BITCNT(AND(M ,Bijij))-Norm(z)
 以上のように処理することで、上記(数式1)の右辺の第1項、すなわち、c ijijの値を取得することができる。
 畳み込み層の処理では、上記処理(内積演算処理)が、処理対象となっている畳み込み層の特徴マップごとに、当該畳み込み層の出力数分、実行される。上記の処理結果は、例えば、内部RAM R1の所定の領域に記憶保持される、あるいは、制御部CPU1へ出力され、制御部CPU1が当該処理結果を用いて所定の処理を実行する。
 以上のように処理することで、二値化ニューラルネットワーク用プロセッサ100では、畳み込み層の処理を実行することができる。すなわち、二値化ニューラルネットワーク用プロセッサ100では、上記の3つのモードによる処理により、(数式1)のyijnを取得するために必要なデータを取得することができ、その結果、畳み込み層の処理を実行することができる。
 (1.2.2:全結合層の処理)
 次に、全結合層の処理について、説明する。
 二値化ニューラルネットワーク用プロセッサ100の量子化処理部2は、l番目の全結合層への入力ベクトルz における最大値-最小値間の量子化幅Δdを、
  Δd={max(z )-min(z )}/(2-1)
  max(x):xの最大値を取得する関数
  min(x):xの最小値を取得する関数
  Q:量子化ビット数
として取得する。
 そして、量子化処理部2は、全結合層への入力ベクトルの最小値が0となるように値をシフトさせる。つまり、量子化処理部2は、
  z ’={z -min(z )}/Q
に相当する処理を実行し、さらに、上記数式により取得された値を四捨五入して整数値に丸め量子化する。さらに、量子化処理部2は、丸め量子化により取得された値に対して、二値化処理をすることで、バイナリコードz (b)∈{0,1}を取得する。
 上記のようにして取得されたバイナリコードz (b)∈{0,1}(量子化処理後の特徴ベクトルBijij)は、内部RAMの領域BinInTに記憶保持される。
 全結合層の処理において、以下のことが成り立つ。
(1)量子化処理後の特徴ベクトルは1つだけである。
 二値化ニューラルネットワーク用プロセッサ100では、上記を考慮して、全結合層の処理を以下の疑似コードに相当する処理により実行する。
≪全結合層の処理の擬似コード≫
Operate_Norm();    // ノルムの計算 (数式2)の右辺の第2項に相当する処理
For (出力数)
   Operate_offset();     // オフセット復元処理
   Operate_dp();   // 内積計算
 二値化ニューラルネットワーク用プロセッサ100は、
(1)上記のノルム計算の処理をNormモードの処理で実行し、
(2)上記のオフセット復元処理をOffsetモードの処理で実行し、
(3)上記の内積計算の処理をDPモード(内積演算処理モード)の処理で実行する。
 以下、これについて、説明する。
 (1.2.2.1:Normモードの処理(全結合層の処理))
 Normモードの処理について、説明する。
 図4に示すように、データD3(=Bijij)が、AND処理部31に入力される。なお、データD3は、量子化処理後の特徴ベクトルBijijであり、内部RAMの領域BinInTに記憶保持されている。
 AND処理部31は、Normモードでは、入力データD3を、そのまま、データD4として、セレクタ32に出力する。
 セレクタ32では、信号値が「1」に設定されたモード信号dp_modeが入力されており、セレクタ32は、当該モード信号dp_modeに基づいて、データD4を選択し、データD5としてカウント処理部33に出力する。
 カウント処理部33は、入力データD5に対してカウント処理(BITCNT関数による処理)を実行し、処理結果をデータD6(=BITCNT(Bijij))としてALU35に出力する。
 マイクロコード取得部34は、Normモード用のマイクロコードμCode(Norm_mode)を取得し、ALU35に出力する。なお、Normモード用のマイクロコードμCode(Norm_mode)は、カウント処理部33から入力されたデータをそのまま出力させる処理をALU35に実行させるコードである。
 ALU35は、図4に示すように、カウント処理部33から出力されるデータD6(=BITCNT(Bijij))を入力する。
 また、ALU35は、マイクロコード取得部34から出力されるNormモード用のマイクロコードμCode(Norm_mode)を入力し、当該Normモード用のマイクロコードμCode(Norm_mode)に従って演算を行う。
 つまり、ALU35は、カウント処理部33から入力されたデータをそのまま出力させる処理を行い、データDo(=BITCNT(Bijij))を出力する。なお、BITCNT(Bijij)は、量子化処理後の特徴ベクトルBijijのノルムに相当する。
 以上のように処理することで、上記(数式2)の右辺の第2項、すなわち、Norm(z)(z=Bijij)の値(ノルム)を取得することができる。
 全結合層の処理では、上記処理(ノルム算出処理)が、処理対象となっている全結合層につき1回実行される。
 (1.2.2.2:Offsetモードの処理(全結合層の処理))
 Offsetモードの処理について、説明する。
 図3に示すように、データD2が、セレクタ32に入力される。
 セレクタ32では、信号値が「0」に設定されたモード信号dp_modeが入力されており、セレクタ32は、当該モード信号dp_modeに基づいて、データD2を選択し、データD5としてカウント処理部33に出力する。
 カウント処理部33は、Offsetモードにおいて、入力データD5を、そのまま、データD6として、ALU35に出力する。
 マイクロコード取得部34は、Offsetモード用のマイクロコードμCode(Offset_mode)を取得し、ALU35に出力する。なお、Offsetモード用のマイクロコードμCode(Offset_mode)は、例えば、以下の処理をALU35に実行させるコードである。
(1)min(x)のロード(読み出し)
(2)データD1(=c )と、データD6(=M )と、min(x)との乗算処理
 なお、min(x)は、量子化処理が実行されるときに取得した値を、例えば、内部RAM R1に記憶保持しておき、マイクロコード取得部34が、min(x)のデータを、内部RAM R1から読み出すようにしてもよい。
 ALU35は、図3に示すように、データD1(=c )とデータD6(=M )とを入力する。なお、データD1(=c )は、内部RAMの領域CVに記憶保持されているスケール係数ベクトルのデータc である。
 また、ALU35は、マイクロコード取得部34から出力されるOffsetモード用のマイクロコードμCode(Offset_mode)を入力し、当該Offsetモード用のマイクロコードμCode(Offset_mode)に従って演算を行う。
 つまり、ALU35は、
(1)min(x)のロード(読み出し)
(2)データD1(=c )と、データD6(=M )と、min(x)との乗算処理
を実行することで、出力データDo(=min(x)Offset)を取得する。
 以上のように処理することで、上記(数式1)の右辺の第2項、すなわち、min(x)Offsetの値(オフセット値)を取得することができる。
 全結合層の処理では、上記処理(オフセット復元処理)が、全結合層の出力数分、実行される。
 (1.2.2.3:DPモードの処理(全結合層の処理))
 DPモードの処理について、説明する。
 図5に示すように、データD2(=M )およびデータD3(=Bijij)が、AND処理部31に入力される。
 データD2は、内部RAMの領域BinMtx0/1に記憶保持されている二値基底行列のデータM である。
 データD3は、量子化処理後の特徴マップBijijであり、内部RAMの領域BinInTに記憶保持されている。
 AND処理部31は、データD2およびデータD3に対してAND処理を実行し、処理結果を含むデータをデータD4(=AND(M ,Bijij))として、セレクタ32に出力する。なお、AND処理は、要素の値が「-1」である場合、当該「-1」を「0」に置換して論理積をとる処理である。
 セレクタ32では、信号値が「1」に設定されたモード信号dp_modeが入力されており、セレクタ32は、当該モード信号dp_modeに基づいて、データD4を選択し、データD5としてカウント処理部33に出力する。
 カウント処理部33は、入力データD5に対してカウント処理(BITCNT関数による処理)を実行し、処理結果をデータD6(=BITCNT(AND(M ,Bijij)))としてALU35に出力する。
 マイクロコード取得部34は、DPモード用のマイクロコードμCode(DP_mode)を取得し、ALU35に出力する。なお、DPモード用のマイクロコードμCode(DP_mode)は、例えば、以下の処理をALU35に実行させるコードである。
(1)D6×2の処理(1ビット左にシフトさせる処理)
(2)上記(1)の結果からノルムを減算する処理
(3)上記(2)の結果に、データD1(=c )を乗算する処理
 ALU35は、図5に示すように、データD1(=c )とデータD6(=BITCNT(AND(M ,Bijij)))とを入力する。なお、データD1(=c )は、内部RAMの領域CVに記憶保持されているスケール係数ベクトルのデータc である。
 また、ALU35は、マイクロコード取得部34から出力されるDPモード用のマイクロコードμCode(DP_mode)を入力し、当該DPモード用のマイクロコードμCode(DP_mode)に従って演算を行う。
 つまり、ALU35は、
(1)D6×2の処理(1ビット左にシフトさせる処理)
(2)上記(1)の結果からノルムを減算する処理(2×D6―Norm(z))
(3)上記(2)の結果に、データD1(=c )を乗算する処理
を実行することで、出力データDo(=c ijij)を取得する。
 つまり、上記により、下記に相当する処理が実行される。
  Do=c ijij
  M ijij=2×BITCNT(AND(M ,Bijij))-Norm(z)
 以上のように処理することで、上記(数式1)の右辺の第1項、すなわち、c ijijの値を取得することができる。
 全結合層の処理では、上記処理(内積演算処理)が、全結合層の出力数分、実行される。上記の処理結果は、例えば、内部RAM R1の所定の領域に記憶保持される、あるいは、制御部CPU1へ出力され、制御部CPU1が当該処理結果を用いて所定の処理を実行する。
 以上のように処理することで、二値化ニューラルネットワーク用プロセッサ100では、全結合層の処理を実行することができる。すなわち、二値化ニューラルネットワーク用プロセッサ100では、上記の3つのモードによる処理により、(数式1)のyijnを取得するために必要なデータを取得することができ、その結果、全結合層の処理を実行することができる。
 以上のように、二値化ニューラルネットワーク用プロセッサ100では、畳み込み層の処理と、全結合層の処理において、同様の処理が実行される部分を共通化し、3つのモード((1)Offsetモード、(2)Normモード、(3)DPモード)の処理を、各モードに対応するマイクロコードにより処理することで実行する。そして、二値化ニューラルネットワーク用プロセッサ100では、畳み込み層の処理と全結合層の処理とにおいて、相違する部分の処理を、上記の3つのモードの処理を適切な順序で組み合わせることで実現する。したがって、二値化ニューラルネットワーク用プロセッサ100では、ハードウェア規模の増大を抑制しつつ、BNNの処理を高速に実行することができる。
 [他の実施形態]
 上記実施形態では、二値化ニューラルネットワーク用プロセッサ100が二値化データをjsよりする場合について、説明したが、本発明はこれに限定されることなく、本発明の手法を多値化データに適用し、多値化ニューラルネットワーク用プロセッサを実現するようにしてもよい。
 また、上記実施形態では、二値化ニューラルネットワーク用プロセッサ100が、3つのモード((1)Offsetモード、(2)Normモード、(3)DPモード)により処理を実行する場合について説明したが、これに限定されることはない。例えば、二値化ニューラルネットワーク用プロセッサ100は、(1)Normモード、(2)DPモードにより処理を実行するようにし、このDPモードの処理に、上記実施形態で説明したOffsetモードの処理を含めるようにしてもよい。また、二値化ニューラルネットワーク用プロセッサ100は、予め、Offsetモードで得られる値を演算により取得し、取得した値を保持しておき、DPモード実行時にその値を使用して処理を実行するようにしてもよい。これにより、二値化ニューラルネットワーク用プロセッサ100において、Normモードの処理とDPモードの処理とをCPUの制御を介在せずに連続して実行することができる。
 上記実施形態では、内積処理部がBNNの処理の一部を実行する場合について説明したが、これに限定されることはなく、例えば、演算処理部PL1の内積処理部3において、活性化関数の処理(例えば、ReLU関数の処理)を実行するようにしてもよい。また、活性化関数の処理(例えば、ReLU関数の処理)は、内積処理部3および制御部CPU1で実行されるものであってもよい。
 上記実施形態では、内部RAMの個数については特に限定せず説明したが、内部RAMは、複数個のRAMにより構成されるものであってもよいし、また、二値化ニューラルネットワーク用プロセッサの外部に設けたRAM(例えば、DRAM)等を用いて、上記実施形態の処理を実行するようにしてもよい。
 上記実施形態において、スカラー、ベクトル、行列で表現したデータについては、一例であり、上記に限定されるものではない。BNNの処理に応じて、スカラー、ベクトル、テンソルのデータとして、二値化ニューラルネットワーク用プロセッサ100が、上記と同様の処理を実行してもよい。
 上記実施形態で説明した二値化ニューラルネットワーク用プロセッサ100の各ブロック(各機能部)は、LSIなどの半導体装置により個別に1チップ化されても良いし、一部又は全部を含むように1チップ化されても良い。また、上記実施形態で説明した二値化ニューラルネットワーク用プロセッサ100の各ブロック(各機能部)は、複数のLSIなどの半導体装置により実現されるものであってもよい。
 なお、ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。
 また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。
 また、上記各実施形態の各機能ブロックの処理の一部または全部は、プログラムにより実現されるものであってもよい。そして、上記各実施形態の各機能ブロックの処理の一部または全部は、コンピュータにおいて、中央演算装置(CPU)により行われる。また、それぞれの処理を行うためのプログラムは、ハードディスク、ROMなどの記憶装置に格納されており、ROMにおいて、あるいはRAMに読み出されて実行される。
 また、上記実施形態の各処理をハードウェアにより実現してもよいし、ソフトウェア(OS(オペレーティングシステム)、ミドルウェア、あるいは、所定のライブラリとともに実現される場合を含む。)により実現してもよい。さらに、ソフトウェアおよびハードウェアの混在処理により実現しても良い。
 例えば、上記実施形態(変形例を含む)の各機能部を、ソフトウェアにより実現する場合、図6に示したハードウェア構成(例えば、CPU、ROM、RAM、入力部、出力部等をバスBusにより接続したハードウェア構成)を用いて、各機能部をソフトウェア処理により実現するようにしてもよい。
 また、上記実施形態における処理方法の実行順序は、必ずしも、上記実施形態の記載に制限されるものではなく、発明の要旨を逸脱しない範囲で、実行順序を入れ替えることができるものである。
 前述した方法をコンピュータに実行させるコンピュータプログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体は、本発明の範囲に含まれる。ここで、コンピュータ読み取り可能な記録媒体としては、例えば、フレキシブルディスク、ハードディスク、CD-ROM、MO、DVD、DVD-ROM、DVD-RAM、大容量DVD、次世代DVD、半導体メモリを挙げることができる。
 上記コンピュータプログラムは、上記記録媒体に記録されたものに限られず、電気通信回線、無線又は有線通信回線、インターネットを代表とするネットワーク等を経由して伝送されるものであってもよい。
 また、文言「部」は、「サーキトリー(circuitry)」を含む概念であってもよい。サーキトリーは、ハードウェア、ソフトウェア、あるいは、ハードウェアおよびソフトウェアの混在により、その全部または一部が、実現されるものであってもよい。
 なお、本発明の具体的な構成は、前述の実施形態に限られるものではなく、発明の要旨を逸脱しない範囲で種々の変更および修正が可能である。
100 二値化ニューラルネットワーク用プロセッサ
PL1 演算処理部
1 DMA制御部
2 量子化処理部
R1 内部RAM
3 内積処理部
34 マイクロコード取得部
35 ALU

Claims (6)

  1.  畳み込み層の処理と全結合層の処理とを含む多値化ニューラルネットワーク用処理を実行するためのニューラルネットワーク用プロセッサであって、
     実数ベクトルデータであるスケーリング係数ベクトルを設定するとともに、多値データを要素とする多値基底行列を設定する制御部と、
     前記畳み込み層に入力される特徴マップおよび前記全結合層に入力される特徴ベクトルに対して量子化処理を実行する量子化処理部であって、前記特徴マップの最小値および前記特徴ベクトルの最小値が所定の値よりも小さい値となるようにオフセット値を設定し、前記特徴マップおよび前記特徴ベクトルの最大値および最小値に基づいて取得される量子化幅を用いて前記量子化処理を実行する前記量子化処理部と、
     (1)前記特徴マップおよび前記特徴ベクトルのノルムを算出するノルムモードと、(2)前記多値基底行列と前記量子化処理後の前記特徴マップまたは前記特徴ベクトルとを用いた内積演算処理を実行する内積演算モードとを有し、前記ノルムモードの処理、および、前記内積演算モードを組み合わせた処理を実行することで、前記畳み込み層の処理と前記全結合層の処理とを実行する内積処理部と、
    を備えるニューラルネットワーク用プロセッサ。
  2.  前記内積処理部は、
     ノルムモード用マイクロコードと、内積演算モード用マイクロコードとを取得するマイクロコード取得部と、
     マイクロコードに基づいて、算術演算処理を実行する算術演算処理部と、
    を備え、
    (1)ノルムモードに設定されている場合、
     前記マイクロコード取得部は、前記ノルムモード用マイクロコードを取得し、
     前記算術演算処理部は、前記ノルムモード用マイクロコードに基づいて、前記算術演算処理を実行し、
    (2)内積演算モードに設定されている場合、
     前記マイクロコード取得部は、前記内積演算モード用マイクロコードを取得し、
     前記算術演算処理部は、前記内積演算モード用マイクロコードに基づいて、前記算術演算処理を実行する、
     請求項1に記載のニューラルネットワーク用プロセッサ。
  3.  前記内積処理部は、
     前記畳み込み層の処理を実行する場合、
    (1)前記ノルムモードの処理を、処理対象の畳み込み層の特徴マップ数分繰り返し実行し、
    (2)前記内積演算モードの処理を、各特徴マップについて前記ノルムモードの処理が実行されるごとに、処理対象の畳み込み層の出力数分繰り返し実行する、
     請求項1または2に記載のニューラルネットワーク用プロセッサ。
  4.  前記内積処理部は、
     前記全結合層の処理を実行する場合、
    (1)処理対象の全結合層につき、前記ノルムモードの処理を1回実行し、
    (2)前記内積演算モードの処理を、処理対象の全結合層の出力数分繰り返し実行する、
     請求項1から3のいずれかに記載のニューラルネットワーク用プロセッサ。
  5.  畳み込み層の処理と全結合層の処理とを含む多値化ニューラルネットワーク用処理を実行するためのニューラルネットワーク用処理方法であって、
     実数ベクトルデータであるスケーリング係数ベクトルを設定するとともに、多値データを要素とする多値基底行列を設定する制御ステップと、
     前記畳み込み層に入力される特徴マップおよび前記全結合層に入力される特徴ベクトルに対して量子化処理を実行する量子化処理ステップであって、前記特徴マップの最小値および前記特徴ベクトルの最小値が所定の値よりも小さい値となるようにオフセット値を設定し、前記特徴マップおよび前記特徴ベクトルの最大値および最小値に基づいて取得される量子化幅を用いて前記量子化処理を実行する前記量子化処理ステップと、
     (1)前記特徴マップおよび前記特徴ベクトルのノルムを算出するノルムモードと、(2)前記多値基底行列と前記量子化処理後の前記特徴マップまたは前記特徴ベクトルとを用いた内積演算処理を実行する内積演算モードとを有し、前記ノルムモードの処理、および、前記内積演算モードを組み合わせた処理を実行することで、前記畳み込み層の処理と前記全結合層の処理とを実行する内積処理ステップと、
    を備えるニューラルネットワーク用処理方法。
  6.  請求項5に記載のニューラルネットワーク用処理方法をコンピュータに実行させるためのプログラム。
PCT/JP2019/005465 2018-07-31 2019-02-15 ニューラルネットワーク用プロセッサ、ニューラルネットワーク用処理方法、および、プログラム WO2020026475A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-143466 2018-07-31
JP2018143466A JP7033507B2 (ja) 2018-07-31 2018-07-31 ニューラルネットワーク用プロセッサ、ニューラルネットワーク用処理方法、および、プログラム

Publications (1)

Publication Number Publication Date
WO2020026475A1 true WO2020026475A1 (ja) 2020-02-06

Family

ID=69230783

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/005465 WO2020026475A1 (ja) 2018-07-31 2019-02-15 ニューラルネットワーク用プロセッサ、ニューラルネットワーク用処理方法、および、プログラム

Country Status (2)

Country Link
JP (1) JP7033507B2 (ja)
WO (1) WO2020026475A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210150313A1 (en) * 2019-11-15 2021-05-20 Samsung Electronics Co., Ltd. Electronic device and method for inference binary and ternary neural networks
WO2023238638A1 (ja) * 2022-06-10 2023-12-14 ソニーセミコンダクタソリューションズ株式会社 情報処理装置および方法
CN118116372A (zh) * 2024-04-28 2024-05-31 福州大学 面向语音关键词识别的二值化深度神经网络硬件加速系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2690772A1 (fr) * 1992-04-29 1993-11-05 Philips Electronique Lab Processeur neuronal muni de moyens pour calculer une norme ou une distance.
JP4513865B2 (ja) * 2008-01-25 2010-07-28 セイコーエプソン株式会社 並列演算装置および並列演算方法
US20160328645A1 (en) * 2015-05-08 2016-11-10 Qualcomm Incorporated Reduced computational complexity for fixed point neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KAMIYA, RYUJI ET AL.: "Speed-up and Model Compression of Identification Calculation by Binarized-CNN", IEICE TECHNICAL REPORT, vol. 116, no. 366, 8 December 2016 (2016-12-08), pages 47 - 52 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210150313A1 (en) * 2019-11-15 2021-05-20 Samsung Electronics Co., Ltd. Electronic device and method for inference binary and ternary neural networks
WO2023238638A1 (ja) * 2022-06-10 2023-12-14 ソニーセミコンダクタソリューションズ株式会社 情報処理装置および方法
CN118116372A (zh) * 2024-04-28 2024-05-31 福州大学 面向语音关键词识别的二值化深度神经网络硬件加速系统

Also Published As

Publication number Publication date
JP2020021208A (ja) 2020-02-06
JP7033507B2 (ja) 2022-03-10

Similar Documents

Publication Publication Date Title
US10096134B2 (en) Data compaction and memory bandwidth reduction for sparse neural networks
US11551068B2 (en) Processing system and method for binary weight convolutional neural network
US20200097828A1 (en) Processing method and accelerating device
US11593658B2 (en) Processing method and device
CN107944545B (zh) 应用于神经网络的计算方法及计算装置
WO2020113355A1 (en) A content adaptive attention model for neural network-based image and video encoders
CN107256424B (zh) 三值权重卷积网络处理系统及方法
KR20210009353A (ko) 뉴럴 네트워크 회로장치, 뉴럴 네트워크 처리 방법 및 뉴럴 네트워크 실행 프로그램
US20200265300A1 (en) Processing method and device, operation method and device
US11544542B2 (en) Computing device and method
CN108171328B (zh) 一种神经网络处理器和采用其执行的卷积运算方法
US20210200513A1 (en) Method and apparatus with floating point processing
US20210191733A1 (en) Flexible accelerator for sparse tensors (fast) in machine learning
EP4128066A1 (en) Feature reordering based on sparsity for improved memory compression transfers during machine learning jobs
WO2020026475A1 (ja) ニューラルネットワーク用プロセッサ、ニューラルネットワーク用処理方法、および、プログラム
Shahshahani et al. Memory optimization techniques for fpga based cnn implementations
WO2021198810A1 (en) Feature reordering based on similarity for improved memory compression transfers during machine learning jobs
EP4293576A1 (en) Hardware implementation of an attention-based neural network
US11657206B1 (en) Method for semiconductor design based on artificial intelligence
JP7171478B2 (ja) 情報処理方法、及び情報処理システム
US20220129729A1 (en) Processor for neural network, processing method for neural network, and non-transitory computer readable storage medium
US20220253709A1 (en) Compressing a Set of Coefficients for Subsequent Use in a Neural Network
CN112132272B (zh) 神经网络的计算装置、处理器和电子设备
US11335045B2 (en) Combining feature maps in an artificial intelligence semiconductor solution
CN116415100A (zh) 业务处理方法、装置、处理器及计算设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19844279

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19844279

Country of ref document: EP

Kind code of ref document: A1