JP6561877B2 - Arithmetic processing unit - Google Patents
Arithmetic processing unit Download PDFInfo
- Publication number
- JP6561877B2 JP6561877B2 JP2016038956A JP2016038956A JP6561877B2 JP 6561877 B2 JP6561877 B2 JP 6561877B2 JP 2016038956 A JP2016038956 A JP 2016038956A JP 2016038956 A JP2016038956 A JP 2016038956A JP 6561877 B2 JP6561877 B2 JP 6561877B2
- Authority
- JP
- Japan
- Prior art keywords
- processing unit
- processing
- arithmetic
- pooling
- result data
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000011176 pooling Methods 0.000 claims description 54
- 238000010606 normalization Methods 0.000 claims description 41
- 238000004364 calculation method Methods 0.000 claims description 33
- 230000010354 integration Effects 0.000 claims description 31
- 238000000034 method Methods 0.000 claims description 28
- 230000008569 process Effects 0.000 claims description 27
- 238000013528 artificial neural network Methods 0.000 claims description 6
- 238000000605 extraction Methods 0.000 description 25
- 230000006870 function Effects 0.000 description 21
- 238000001994 activation Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 12
- 238000013527 convolutional neural network Methods 0.000 description 8
- 230000004913 activation Effects 0.000 description 7
- 238000005070 sampling Methods 0.000 description 5
- 239000000284 extract Substances 0.000 description 4
- 238000011144 upstream manufacturing Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000002131 composite material Substances 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000012447 hatching Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Complex Calculations (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Description
本発明は、演算処理装置に関する。 The present invention relates to an arithmetic processing device.
従来より、複数の処理層が階層的に接続されたニューラルネットワークによる演算を実行する演算処理装置が考えられている。特に画像認識を行う演算処理装置においては、いわゆる畳み込みニューラルネットワーク(CNN:Convolutional Neural Network)が中核的な存在となっている。 2. Description of the Related Art Conventionally, there has been considered an arithmetic processing device that executes arithmetic operations using a neural network in which a plurality of processing layers are hierarchically connected. Particularly in arithmetic processing devices that perform image recognition, a so-called convolutional neural network (CNN) is at the core.
従来の畳み込みニューラルネットワークでは、前段の階層により得られる複数の異なる演算結果データ、つまり特徴量の抽出結果データに対して畳み込み演算処理を実行し、活性化処理を実行し、プーリング処理を実行することで、より高次元の特徴量の抽出を行っている。そして、さらに、プーリング処理による処理結果データに対して正規化処理を施すことにより、特徴量の認識率を向上することができ、特徴量の抽出処理を一層優位に行うことができる。 In a conventional convolutional neural network, a convolution operation process is executed on a plurality of different calculation result data obtained by the previous hierarchy, that is, feature value extraction result data, an activation process is executed, and a pooling process is executed. Therefore, higher-dimensional feature amounts are extracted. Further, by performing normalization processing on the processing result data by the pooling processing, the feature amount recognition rate can be improved, and the feature amount extraction processing can be performed more preferentially.
ところで、処理結果データに対して正規化処理を行う場合、従来では、まず、畳み込み演算処理時にメモリからデータを読み出し、読み出したデータに対して畳み込み演算処理およびプーリング処理を行い、その演算結果データをメモリに格納する。そして、その後、同一の処理階層において、そのメモリに格納したデータを読み出し、読み出したデータに対して正規化処理を行う。即ち、従来技術では、同一の処理階層においてメモリからのデータの読み出しを2回行う必要があり、大きなレイテンシが発生してしまう。 By the way, when performing normalization processing on processing result data, conventionally, first, data is read from the memory at the time of convolution operation processing, convolution operation processing and pooling processing are performed on the read data, and the operation result data is Store in memory. After that, in the same processing hierarchy, the data stored in the memory is read, and the read data is normalized. That is, in the prior art, it is necessary to read data from the memory twice in the same processing hierarchy, which causes a large latency.
そこで、本発明は、ニューラルネットワークによる演算処理を実現する演算処理装置において、正規化処理を行うための構成に改良を施すことにより、レイテンシの発生を抑えることを目的とする。 Accordingly, an object of the present invention is to suppress the occurrence of latency by improving the configuration for performing normalization processing in an arithmetic processing device that realizes arithmetic processing using a neural network.
本発明に係る演算処理装置は、複数の処理層が階層的に接続されたニューラルネットワークによる演算を実行する演算処理装置であって、畳み込み演算処理部、プーリング処理部、積算処理部、統計処理部、正規化処理部を備える。畳み込み演算処理部は、前階層から入力される入力データに対して畳み込み演算処理を実行する。プーリング処理部は、前記畳み込み演算部による処理結果データに対してプーリング処理を実行する。積算処理部は、次回層の演算が開始される前に、前記プーリング処理部による処理結果データを積算する。統計処理部は、前記積算処理部が積算するデータの平均値および標準偏差を算出する。正規化処理部は、次回層の演算が開始されると、前階層において前記統計処理部により算出された平均値および標準偏差を用いて、前階層において前記プーリング処理部により出力された処理結果データに対して正規化処理を実行する。 An arithmetic processing apparatus according to the present invention is an arithmetic processing apparatus that performs an arithmetic operation using a neural network in which a plurality of processing layers are hierarchically connected, and includes a convolution arithmetic processing unit, a pooling processing unit, an integration processing unit, and a statistical processing unit. And a normalization processing unit. The convolution operation processing unit performs a convolution operation process on the input data input from the previous layer. The pooling processing unit performs a pooling process on the processing result data by the convolution operation unit. The integration processing unit integrates the processing result data by the pooling processing unit before the calculation of the next layer is started. The statistical processing unit calculates an average value and a standard deviation of the data integrated by the integration processing unit. When the calculation of the next layer is started, the normalization processing unit uses the average value and the standard deviation calculated by the statistical processing unit in the previous layer, and the processing result data output by the pooling processing unit in the previous layer Normalization processing is executed for.
この構成によれば、次回層における演算処理の入力部分において、前階層の演算処理時に得られた統計値を用いて正規化処理を行うことができる。そのため、同一の処理階層においてメモリからのデータの読み出しを2回行う必要が無く、レイテンシの発生を抑えることができる。 According to this configuration, the normalization process can be performed using the statistical value obtained during the calculation process of the previous layer in the input part of the calculation process in the next layer. Therefore, it is not necessary to read data from the memory twice in the same processing hierarchy, and the occurrence of latency can be suppressed.
以下、演算処理装置の複数の実施形態について図面を参照しながら説明する。なお、各実施形態において実質的に同一の要素には同一の符号を付し、説明を省略する。
(ニューラルネットワーク)
図1には、詳しくは後述する演算処理装置10,20,30,40,50,60に適用されるニューラルネットワーク、この場合、畳み込みニューラルネットワークの構成を概念的に示している。即ち、畳み込みニューラルネットワークNは、入力データである画像データD1から所定の形状やパターンを認識する画像認識技術に応用されるものであり、中間層Naと全結合層Nbとを有する。中間層Naは、複数の特徴量抽出処理層Na1,Na2・・・が階層的に接続された構成である。各特徴量抽出処理層Na1,Na2・・・は、それぞれ畳み込み層Cおよびプーリング層Pを備える。
Hereinafter, a plurality of embodiments of an arithmetic processing device will be described with reference to the drawings. In each embodiment, substantially the same elements are denoted by the same reference numerals, and description thereof is omitted.
(neural network)
FIG. 1 conceptually shows the configuration of a neural network, in this case a convolutional neural network, applied to
次に、中間層Naにおける処理の流れについて説明する。図2に例示するように、第1層目の特徴量抽出処理層Na1では、演算処理装置は、入力される画像データD1を例えばラスタスキャンにより所定サイズごとに走査する。そして、走査したデータに対して周知の特徴量抽出処理を施すことにより入力画像に含まれる複数の特徴量を抽出する。なお、第1層目の特徴量抽出処理層Na1では、例えば水平方向に延びる線状の特徴量や斜め方向に延びる線状の特徴量などといった比較的シンプルな単独の特徴量を抽出する。このとき、演算処理装置は、入力画像に含まれる複数の特徴にそれぞれ対応する複数の特徴マップを生成する。 Next, the flow of processing in the intermediate layer Na will be described. As illustrated in FIG. 2, in the first feature amount extraction processing layer Na1, the arithmetic processing unit scans the input image data D1 for each predetermined size by, for example, raster scanning. A plurality of feature amounts included in the input image are extracted by performing a known feature amount extraction process on the scanned data. Note that the first feature amount extraction processing layer Na1 extracts relatively simple single feature amounts such as a linear feature amount extending in the horizontal direction and a linear feature amount extending in the oblique direction. At this time, the arithmetic processing device generates a plurality of feature maps respectively corresponding to the plurality of features included in the input image.
第2層目の特徴量抽出処理層Na2では、演算処理装置は、前階層の特徴量抽出処理層Na1から入力される入力データを例えばラスタスキャンにより所定サイズごとに走査する。そして、走査したデータに対して周知の特徴量抽出処理を施すことにより入力画像に含まれる複数の特徴量を抽出する。なお、第2層目の特徴量抽出処理層Na2では、第1層目の特徴量抽出処理層Na1で抽出された複数の特徴量の空間的な位置関係などを考慮しながら統合させることで、より高次元の複合的な特徴量を抽出する。このとき、演算処理装置は、入力画像に含まれる複数の特徴にそれぞれ対応する複数の特徴マップを生成する。 In the second feature amount extraction processing layer Na2, the arithmetic processing unit scans the input data input from the preceding feature amount extraction processing layer Na1 for each predetermined size by, for example, raster scanning. A plurality of feature amounts included in the input image are extracted by performing a known feature amount extraction process on the scanned data. In addition, in the feature amount extraction processing layer Na2 of the second layer, by integrating the spatial positional relationship of a plurality of feature amounts extracted by the feature amount extraction processing layer Na1 of the first layer, Extract higher-dimensional composite features. At this time, the arithmetic processing device generates a plurality of feature maps respectively corresponding to the plurality of features included in the input image.
第3層目の特徴量抽出処理層Na3では、演算処理装置は、前階層の特徴量抽出処理層Na2から入力される入力データを例えばラスタスキャンにより所定サイズごとに走査する。そして、走査したデータに対して周知の特徴量抽出処理を施すことにより入力画像に含まれる複数の特徴量を抽出する。なお、第3層目の特徴量抽出処理層Na3では、第2層目の特徴量抽出処理層Na2で抽出された複数の特徴量の空間的な位置関係などを考慮しながら統合させることで、より高次元の複合的な特徴量を抽出する。このとき、演算処理装置は、入力画像に含まれる複数の特徴にそれぞれ対応する複数の特徴マップを生成する。このように、複数の特徴量抽出処理層による特徴量の抽出処理を繰り返すことで、演算処理装置は、画像データD1に含まれる検出対象物体の画像認識を行う。 In the third feature quantity extraction processing layer Na3, the arithmetic processing unit scans the input data input from the previous feature quantity extraction processing layer Na2 for each predetermined size by, for example, raster scanning. A plurality of feature amounts included in the input image are extracted by performing a known feature amount extraction process on the scanned data. The feature extraction processing layer Na3 of the third layer is integrated by considering the spatial positional relationship of a plurality of feature amounts extracted by the feature extraction processing layer Na2 of the second layer, Extract higher-dimensional composite features. At this time, the arithmetic processing device generates a plurality of feature maps respectively corresponding to the plurality of features included in the input image. In this way, by repeating the feature amount extraction processing by the plurality of feature amount extraction processing layers, the arithmetic processing device performs image recognition of the detection target object included in the image data D1.
演算処理装置は、中間層Naにおいて複数の特徴量抽出処理層Na1,Na2,Na3・・・による処理を繰り返すことで入力画像データD1に含まれる種々の特徴量を高次元で抽出していく。そして、演算処理装置は、中間層Naの処理により得られた結果を中間演算結果データとして全結合層Nbに出力する。 The arithmetic processing unit extracts various feature amounts included in the input image data D1 in a high dimension by repeating the processing by the plurality of feature amount extraction processing layers Na1, Na2, Na3... In the intermediate layer Na. Then, the arithmetic processing unit outputs the result obtained by the processing of the intermediate layer Na to the all coupling layer Nb as intermediate operation result data.
全結合層Nbは、中間層Naから得られる複数の中間演算結果データを結合して最終的な演算結果データを出力する。即ち、全結合層Nbは、中間層Naから得られる複数の中間演算結果データを結合し、さらに、その結合結果に対して重み係数を異ならせながら積和演算を行うことにより、最終的な演算結果データ、即ち、入力データである画像データD1に含まれる検出対象物を認識した画像データを出力する。このとき、積和演算による演算結果の値が大きい部分が検出対象物の一部または全部として認識される。 The total coupling layer Nb combines a plurality of intermediate calculation result data obtained from the intermediate layer Na and outputs final calculation result data. That is, the total connection layer Nb combines a plurality of intermediate operation result data obtained from the intermediate layer Na, and further performs a sum-of-products operation while varying the weighting coefficient for the combined result, thereby obtaining a final operation. Result data, that is, image data in which the detection target included in the image data D1 as input data is recognized is output. At this time, the part where the value of the result of the product-sum operation is large is recognized as a part or all of the detection target.
次に、演算処理装置による特徴量抽出処理の流れについて説明する。図3に例示するように、演算処理装置は、前階層の特徴量抽出処理層から入力される入力データDnを所定サイズ、この場合、図にてハッチングで示す3×3画素ごとのフィルタサイズにより走査する。なお、画素サイズは、3×3画素に限られず、例えば5×5画素など適宜変更することができる。 Next, a flow of feature amount extraction processing by the arithmetic processing device will be described. As illustrated in FIG. 3, the arithmetic processing device uses a predetermined size for the input data Dn input from the feature extraction processing layer in the previous hierarchy, in this case, according to the filter size for each 3 × 3 pixel indicated by hatching in the figure. Scan. Note that the pixel size is not limited to 3 × 3 pixels, and can be appropriately changed, for example, 5 × 5 pixels.
そして、演算処理装置は、走査したデータに対して、それぞれ周知の畳み込み演算を行う。そして、演算処理装置は、畳み込み演算後のデータに対して周知の活性化処理を行い、畳み込み層Cの出力とする。そして、演算処理装置は、畳み込み層Cの出力データCnに対して、所定サイズ、この場合、2×2画素ごとに周知のプーリング処理を行い、プーリング層Pの出力とする。そして、演算処理装置は、プーリング層Pの出力データPnを次の階層の特徴量抽出処理層に出力する。なお、画素サイズは、2×2画素に限られず適宜変更することができる。 The arithmetic processing unit performs a known convolution operation on the scanned data. Then, the arithmetic processing device performs a well-known activation process on the data after the convolution operation, and outputs the result to the convolution layer C. Then, the arithmetic processing unit performs a well-known pooling process on the output data Cn of the convolution layer C at a predetermined size, in this case, 2 × 2 pixels, and outputs the result to the pooling layer P. Then, the arithmetic processing device outputs the output data Pn of the pooling layer P to the feature amount extraction processing layer of the next layer. The pixel size is not limited to 2 × 2 pixels and can be changed as appropriate.
ここで、演算処理装置は、プーリング処理後のデータPn1,Pn2,・・・に対して周知の正規化処理を施すことにより、プーリングデータPnを所定の基準形式である正規化データNn1,Pn2,・・・に変換してから次の階層に出力する。これにより、より統一された形式でプーリングデータPnを次の階層に出力することができる。従って、特徴量の認識率を向上することができ、特徴量の抽出処理を一層優位に行うことができる。後述する各実施形態においては、演算処理装置には、この正規化処理を行うための構成に改良が施されている。 Here, the arithmetic processing unit performs a well-known normalization process on the pooled data Pn1, Pn2,. ... and then output to the next layer. Thereby, the pooling data Pn can be output to the next layer in a more unified format. Therefore, the recognition rate of the feature amount can be improved, and the feature amount extraction process can be performed more preferentially. In each embodiment described later, the arithmetic processing device is improved in the configuration for performing this normalization process.
図4には、畳み込み演算処理に用いられる畳み込み関数、活性化処理に用いられる関数、プーリング処理に用いられる関数の一般的な例を示している。即ち、畳み込み関数Yijは、直前の層の出力Xijに学習により得られる重み係数Wp,qを乗算した値を累積する関数となっている。なお、「N」は1サイクルの畳み込み演算処理により処理される画素サイズを示す。即ち、例えば1演算サイクルの画素サイズが「3×3」画素である場合、Nの値は「2」である。また、畳み込み関数Yijは、累積値に所定のバイアス値を加算する関数としてもよい。また、畳み込み関数は、全結合処理にも対応し得る積和演算が可能な関数であれば、種々の関数を採用することができる。また、活性化処理には、周知のロジスティックジグモイド関数やReLU関数(Rectified Linear Units)などが用いられる。また、プーリング処理には、入力されるデータの最大値を出力する周知の最大プーリング関数や、入力されるデータの平均値を出力する周知の平均プーリング関数などが用いられる。 FIG. 4 shows general examples of a convolution function used for convolution operation processing, a function used for activation processing, and a function used for pooling processing. That is, the convolution function Yij is a function that accumulates values obtained by multiplying the output Xij of the immediately preceding layer by the weighting factors Wp, q obtained by learning. Note that “N” indicates a pixel size to be processed by one cycle of convolution operation processing. That is, for example, when the pixel size of one calculation cycle is “3 × 3” pixels, the value of N is “2”. Further, the convolution function Yij may be a function for adding a predetermined bias value to the accumulated value. Various functions can be adopted as the convolution function as long as it is a function capable of multiply-accumulate operation that can cope with all-join processing. For the activation process, a well-known logistic sigmoid function, ReLU function (Rectified Linear Units), or the like is used. For the pooling process, a known maximum pooling function that outputs a maximum value of input data, a known average pooling function that outputs an average value of input data, or the like is used.
上述した畳み込みニューラルネットワークNによれば、コンボルーション層Cによる処理およびプーリング層Pによる処理が繰り返されることにより、より高次元の特徴量の抽出が可能となる。次に、この畳み込みニューラルネットワークNを適用した演算処理装置に係る複数の実施形態について説明する。なお、各実施形態に係る図においては、第n層目の処理を行っている演算処理装置を実線により示し、次回層である第n+1層目の処理を行っている演算処理装置を二点鎖線により示している。また、第n層目の処理を行っている演算ブロックを実線により示し、次回層である第n+1層目の処理を行っている演算ブロックを二点鎖線により示している。 According to the convolutional neural network N described above, the processing by the convolution layer C and the processing by the pooling layer P are repeated, so that higher-dimensional feature amounts can be extracted. Next, a plurality of embodiments according to an arithmetic processing device to which the convolutional neural network N is applied will be described. In the drawings according to the embodiments, the arithmetic processing device that performs the processing of the nth layer is indicated by a solid line, and the arithmetic processing device that performs the processing of the (n + 1) th layer that is the next layer is indicated by a two-dot chain line. It shows by. In addition, a calculation block that performs processing of the nth layer is indicated by a solid line, and a calculation block that performs processing of the (n + 1) th layer that is the next layer is indicated by a two-dot chain line.
(第1実施形態)
図5に例示する演算処理装置10は、畳み込み演算処理部11、プーリング処理部12、積算処理部13、統計処理部14、正規化処理部15を備える。畳み込み演算処理部11は、前階層から入力される入力データに対して周知の畳み込み演算処理を実行して、その処理結果データをプーリング処理部12に出力する。なお、演算処理装置10は、畳み込み演算処理部11の処理結果データに対して図示しない活性化処理部により周知の活性化処理を実行してからプーリング処理部12に出力する。プーリング処理部12は、畳み込み演算処理部11から入力される処理結果データに対して周知のプーリング処理を実行して、その処理結果データを、次回層の演算処理時における正規化処理部15に出力するようになっている。
(First embodiment)
The
積算処理部13は、プーリング処理部12が出力する処理結果データを、次回層における演算処理が開始される前に積算する。統計処理部14は、積算処理部13が積算するデータ、つまり、プーリング処理部12が出力する処理結果データの平均値および標準偏差を算出する。正規化処理部15は、図示しない減算器や除算器などを備えており、次回層における演算処理が開始されると、前階層において統計処理部14により算出された平均値および標準偏差を用いて、前階層においてプーリング処理部12により出力された処理結果データに対して周知の正規化処理を実行する。正規化処理部15は、例えば図6に示す正規化関数に基づいて正規化処理を実行する。
The
演算処理装置10によれば、図7に例示するように、次回層における演算処理の入力部分において、前階層の演算処理時に得られた統計値を用いて正規化処理を行うようにした。そのため、同一の処理階層においてメモリからのデータの読み出しを2回行う必要が無く、連続する2層にわたって正規化処理をパイプライン化して行うことができる。よって、処理の高速化を図ることができ、レイテンシの発生を抑えることができる。
According to the
(第2実施形態)
図8に例示する演算処理装置20は、畳み込み演算処理部21、プーリング処理部22、積算処理部23、統計処理部24、正規化処理部25を備える。正規化処理部25は、減算処理部25aおよび除算処理部25bを備える。
(Second Embodiment)
The
減算処理部25aは、図9に例示する減算式(1)に基づいて、前階層において統計処理部24により算出された平均値を、前階層においてプーリング処理部22により出力された処理結果データから減算する。畳み込み演算処理部21は、減算処理部25aが出力する処理結果データに対し周知の畳み込み演算処理を実行する。除算処理部25bは、図9に例示する除算式(2)に基づいて、畳み込み演算処理部21が出力する処理結果データを、前階層において統計処理部24により算出された標準偏差により除算する。
The subtraction processing unit 25a calculates the average value calculated by the
減算および除算からなる正規化処理を行った上で畳み込み演算処理を行う構成では、正規化処理部に入力されるデータの数に応じた除算回路が必要であり、回路規模が大きくなるという課題がある。演算処理装置20によれば、減算からなる正規化処理を行い、その処理結果データに対して畳み込み演算処理を行い、その処理結果データに対して除算からなる正規化処理を行うようにした。畳み込み演算処理において、入力されるデータは複数であるのに対し、出力されるデータは1つである。そのため、演算処理装置20の構成によれば、畳み込み演算処理の後に除算を行うようにしたので、除算回路の数を削減することができる。
In a configuration in which convolution operation processing is performed after performing normalization processing including subtraction and division, a division circuit corresponding to the number of data input to the normalization processing unit is necessary, and there is a problem that the circuit scale increases. is there. According to the
(第3実施形態)
図10に例示する演算処理装置30は、畳み込み演算処理部31、プーリング処理部32、積算処理部33、統計処理部34、正規化処理部35、サンプリング処理部36を備える。図11に例示するように、サンプリング処理部36は、プーリング処理部32が出力する処理結果データの一部をサンプリングする。そして、サンプリング処理部36は、サンプリングしたデータを積算処理部33に出力する。そして、積算処理部33は、サンプリング処理部36によってサンプリングされたデータ、つまり、プーリング処理部32による処理結果データの一部のみを積算する。そして、統計処理部34は、積算処理部33により積算されたプーリング処理部32による処理結果データの一部のみに基づいて、その平均値および標準偏差を算出する。
(Third embodiment)
The
演算処理装置30によれば、プーリング処理部32による処理結果データの全てではなく一部のみに基づいて、その平均値と標準偏差を算出して正規化処理に用いる。このように、プーリング処理部32による処理結果データの一部のみに基づく統計値によっても十分精度が高い正規化処理を行うことができる。また、演算処理装置30によれば、積算処理部33の処理負荷を低減することができる。
According to the
(第4実施形態)
図12に例示する演算処理装置40は、畳み込み演算処理部41、プーリング処理部42、積算処理部43、統計処理部44、正規化処理部45、右シフト処理部46、左シフト処理部47を備える。右シフト処理部46は、プーリング処理部42と積算処理部43との間に設けられており、プーリング処理部42による処理結果データを所定ビットだけ右にシフトさせて積算処理部43に出力する。左シフト処理部47は、積算処理部43と統計処理部44との間に設けられており、積算処理部43による処理結果データを所定ビットだけ左にシフトさせて統計処理部44に出力する。
(Fourth embodiment)
The
なお、右シフト処理部46がデータを右シフトするときのビット数と、左シフト処理部47がデータを左シフトするときのビット数は同じである。そのため、図13に例示するように、積算処理部43は、プーリング処理部42による処理結果データの上位の所定ビットのみを積算する構成となる。演算処理装置40によれば、積算処理部43により、プーリング処理部42による処理結果データの全ビットではなく上位の所定ビットのみを積算する。この構成によれば、積算処理部43の処理負荷を低減することができる。
The number of bits when the right
(第5実施形態)
図14に例示する演算処理装置50は、畳み込み演算処理部51、プーリング処理部52、積算処理部53、統計処理部54、正規化処理部55を有する演算ブロック500を複数備える構成である。なお、図14には、1つの演算ブロック500のみを示している。演算ブロック500には、それぞれ重み調整処理部56が備えられている。重み調整処理部56は、各演算ブロック500の畳み込み演算処理部51がそれぞれ畳み込み演算処理を実行する際に用いる重み係数のうち最大の値を示す重み係数を特定する。そして、重み調整処理部56は、その特定した重み係数の最大値の絶対値により、畳み込み演算処理部51が用いる重み係数を除算する。これにより、重み調整処理部56は、重み係数を−1〜1の範囲に収まるように調整する。
(Fifth embodiment)
The
演算処理装置50は、複数の畳み込み演算処理部51がそれぞれ畳み込み演算処理を実行する際に用いる重み係数の最大値を特定し、その特定した最大値の絶対値により、複数の畳み込み演算処理部51が用いる重み係数を除算して、重み係数を−1〜1の範囲に調整する。このように重み係数を所定の範囲内に収めることで、当該重み係数を用いて算出される畳み込み演算処理の処理結果データを所定の範囲内に収めることができ、処理結果データのぶれを抑えることができる。よって、処理結果データを、浮動小数点数よりも表現範囲が狭い固定小数点数によっても表現することができ、また、固定小数点数による処理により、より高速で精度の良い演算が可能となる。
The
なお、図15に例示するように、演算処理装置50は、さらに、記憶部57、乗算処理部58を備える構成とするとよい。この構成において、記憶部57は、重み調整処理部56が特定した重み係数の最大値の絶対値を記憶する。乗算処理部58は、例えば乗算器で構成されており、畳み込み演算処理部51が出力する処理結果データに、記憶部57に記憶されている重み係数の最大値の絶対値を乗算して、活性化処理部59に出力する。活性化処理部59は、入力される処理結果データに対して周知の活性化処理を実行して、その処理結果データをプーリング処理部52に出力する。
As illustrated in FIG. 15, the
この構成は、活性化処理に用いる活性化関数が非線形である場合に特に効果を発揮する。即ち、図16に例示する非線形の活性化関数により処理結果データにおいては、畳み込み演算の重み係数を調整しない場合の処理結果R1付近における処理結果の変化量と、畳み込み演算の重み係数を調整した場合の処理結果R2付近における処理結果の変化量とが異なってくる。そのため、演算処理装置50は、重み係数を調整した場合の処理結果データR2に対し、重み係数の調整の際に用いた最大値の絶対値を乗算することにより、矢印rで示すように、畳み込み演算処理の処理結果データを、重み係数を調整しない場合の処理結果データR1に戻すようにした。これにより、調整された重み係数により高速で精度の良い畳み込み演算を行いつつも、その処理結果データを、重み係数を調整しなかった場合の処理結果データに近似させることができ、特に活性化関数が非線形である場合であっても、その影響を抑えることができる。
This configuration is particularly effective when the activation function used for the activation process is non-linear. That is, in the processing result data by the non-linear activation function illustrated in FIG. 16, when the amount of change in the processing result near the processing result R1 when the weighting factor of the convolution operation is not adjusted and the weighting factor of the convolution operation are adjusted. The amount of change in the processing result in the vicinity of the processing result R2 is different. Therefore, the
(第6実施形態)
図17に例示する演算処理装置60は、畳み込み演算処理部61、プーリング処理部62、積算処理部63、正規化処理部65を有する演算ブロック600を複数備える。演算ブロック600には、それぞれ、加算処理部66、記憶部67が備えられている。また、複数の演算ブロック600のうちの何れか1つ、この場合、最上流の演算ブロック600には、統計処理部64が備えられている。なお、説明の便宜上、図の下側を下流側、図の上側を上流側と定義する。
(Sixth embodiment)
An
加算処理部66は、自身と同じ演算ブロック600を構成する積算処理部63から入力されるデータに、自身よりも下流側の演算ブロック600から入力されるデータを加算して、記憶部67に出力する。記憶部67は、加算処理部66から入力されるデータを記憶するとともに、そのデータを自身よりも上流側の演算ブロック600の加算処理部66に出力する。最も上流側の演算ブロック600の記憶部67は、記憶したデータを統計処理部64に出力する。統計処理部64は、入力されたデータについて平均値と標準偏差を算出し、各演算ブロック600の正規化処理部65にそれぞれ出力する。即ち、統計処理部64は、複数の積算処理部63が算出するデータの平均値および標準偏差を算出して、複数の正規化処理部65にそれぞれ提供する。
The
演算処理装置60によれば、複数の演算ブロック600を備える構成において、各演算ブロック600にそれぞれ統計処理部64を設けるのではなく、1つの演算ブロック600のみに統計処理部64を設け、当該統計処理部64が出力する統計値を複数の正規化処理部65により共用するようにした。この構成によれば、複数の演算ブロック600を備える場合であっても、回路規模が比較的大きくなる統計処理部64を1つだけに抑えることができ、装置全体としてコンパクト化や低コスト化を図ることができる。
According to the
(その他の実施形態)
なお、本発明は、上述した実施形態に限定されるものではなく、その要旨を逸脱しない範囲で種々の実施形態に適用可能である。例えば、上述した複数の実施形態を適宜組み合わせて実施してもよい。
(Other embodiments)
Note that the present invention is not limited to the above-described embodiments, and can be applied to various embodiments without departing from the gist thereof. For example, you may implement combining several embodiment mentioned above suitably.
図面中、10,20,30,40,50,60は演算処理装置、11,21,31,41,51,61は畳み込み演算処理部、12,22,32,42,52,62はプーリング処理部、13,23,33,43,53,63は積算処理部、14,24,34,44,54,64は統計処理部、15,25,35,45,55,65は正規化処理部、25aは減算処理部、25bは除算処理部、56は重み調整処理部、500は演算ブロック、600は演算ブロックを示す。 In the drawings, 10, 20, 30, 40, 50, 60 are arithmetic processing units, 11, 21, 31, 41, 51, 61 are convolution arithmetic processing units, 12, 22, 32, 42, 52, 62 are pooling processes. , 13, 23, 33, 43, 53, 63 are integration processing units, 14, 24, 34, 44, 54, 64 are statistical processing units, and 15, 25, 35, 45, 55, 65 are normalization processing units. , 25a denotes a subtraction processing unit, 25b denotes a division processing unit, 56 denotes a weight adjustment processing unit, 500 denotes a calculation block, and 600 denotes a calculation block.
Claims (7)
前階層から入力される入力データに対して畳み込み演算処理を実行する畳み込み演算処理部(11,21,31,41,51,61)と、
前記畳み込み演算処理部による処理結果データに対してプーリング処理を実行するプーリング処理部(12,22,32,42,52,62)と、
次回層の演算が開始される前に、前記プーリング処理部による処理結果データを積算する積算処理部(13,23,33,43,53,63)と、
前記積算処理部が積算するデータの平均値および標準偏差を算出する統計処理部(14,24,34,44,54,64)と、
次回層の演算が開始されると、前階層において前記統計処理部により算出された平均値および標準偏差を用いて、前階層において前記プーリング処理部により出力された処理結果データに対して正規化処理を実行する正規化処理部(15,25,35,45,55,65)と、
を備える演算処理装置。 An arithmetic processing device (10, 20, 30, 40, 50, 60) that executes an arithmetic operation using a neural network in which a plurality of processing layers are hierarchically connected,
A convolution operation processing unit (11, 21, 31, 41, 51, 61) for executing convolution operation processing on input data input from the previous layer;
A pooling processing unit (12, 22, 32, 42, 52, 62) for performing a pooling process on the processing result data by the convolution operation processing unit;
An integration processing unit (13, 23, 33, 43, 53, 63) for integrating the processing result data by the pooling processing unit before the calculation of the next layer is started;
A statistical processing unit (14, 24, 34, 44, 54, 64) for calculating an average value and a standard deviation of data integrated by the integration processing unit;
When calculation of the next layer is started, normalization processing is performed on the processing result data output by the pooling processing unit in the previous layer, using the average value and the standard deviation calculated by the statistical processing unit in the previous layer A normalization processing unit (15, 25, 35, 45, 55, 65) for executing
An arithmetic processing device comprising:
前記減算処理部は、前階層において前記統計処理部(24)により算出された平均値を、前階層において前記プーリング処理部(22)により出力された処理結果データから減算し、
前記畳み込み演算処理部(21)は、前記減算処理部が出力する処理結果データに対して畳み込み演算処理を実行し、
前記除算処理部は、前記畳み込み演算処理部が出力する処理結果データを、前階層において前記統計処理部(24)により算出された標準偏差により除算する請求項1に記載の演算処理装置。 The normalization processing unit (25) includes a subtraction processing unit (25a) and a division processing unit (25b).
The subtraction processing unit subtracts the average value calculated by the statistical processing unit (24) in the previous hierarchy from the processing result data output by the pooling processing unit (22) in the previous hierarchy,
The convolution operation processing unit (21) performs a convolution operation processing on the processing result data output from the subtraction processing unit,
2. The arithmetic processing device according to claim 1, wherein the division processing unit divides the processing result data output from the convolution arithmetic processing unit by a standard deviation calculated by the statistical processing unit (24) in a previous hierarchy.
前記統計処理部(64)は、複数の前記積算処理部(63)が算出するデータの平均値および標準偏差を算出する請求項1から4の何れか1項に記載の演算処理装置。 A plurality of calculation blocks (600) including the convolution calculation processing unit (61), the pooling processing unit (62), the integration processing unit (63), and the normalization processing unit (65) are provided.
The arithmetic processing unit according to claim 1, wherein the statistical processing unit (64) calculates an average value and a standard deviation of data calculated by the plurality of integration processing units (63).
複数の前記畳み込み演算処理部がそれぞれ畳み込み演算処理を実行する際に用いる重み係数の最大値を特定し、その特定した最大値の絶対値により、複数の前記畳み込み演算処理部が用いる重み係数を除算する重み調整処理部(56)を備える請求項1から5の何れか1項に記載の演算処理装置。 A plurality of calculation blocks (500) including the convolution calculation processing unit (51), the pooling processing unit (52), the integration processing unit (53), and the normalization processing unit (55) are provided,
The plurality of convolution arithmetic processing units respectively specify the maximum value of the weighting coefficient used when executing the convolution arithmetic processing, and the weighting factor used by the plurality of convolution arithmetic processing units is divided by the absolute value of the specified maximum value The arithmetic processing unit according to any one of claims 1 to 5, further comprising a weight adjustment processing unit (56) for performing the processing.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016038956A JP6561877B2 (en) | 2016-03-01 | 2016-03-01 | Arithmetic processing unit |
PCT/JP2017/001554 WO2017149971A1 (en) | 2016-03-01 | 2017-01-18 | Arithmetic processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016038956A JP6561877B2 (en) | 2016-03-01 | 2016-03-01 | Arithmetic processing unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017156941A JP2017156941A (en) | 2017-09-07 |
JP6561877B2 true JP6561877B2 (en) | 2019-08-21 |
Family
ID=59743775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016038956A Active JP6561877B2 (en) | 2016-03-01 | 2016-03-01 | Arithmetic processing unit |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6561877B2 (en) |
WO (1) | WO2017149971A1 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019082859A1 (en) | 2017-10-23 | 2019-05-02 | 日本電気株式会社 | Inference device, convolutional computation execution method, and program |
JP6757349B2 (en) | 2018-03-12 | 2020-09-16 | 株式会社東芝 | An arithmetic processing unit that realizes a multi-layer convolutional neural network circuit that performs recognition processing using fixed point numbers. |
CN108875787B (en) * | 2018-05-23 | 2020-07-14 | 北京市商汤科技开发有限公司 | Image recognition method and device, computer equipment and storage medium |
US11836462B2 (en) | 2018-07-12 | 2023-12-05 | Sony Group Corporation | Multiply-accumulate system and multiply-accumulate method |
JP2020201883A (en) | 2019-06-13 | 2020-12-17 | キヤノン株式会社 | Data processing device and control method thereof |
JP7342544B2 (en) | 2019-09-09 | 2023-09-12 | 富士通株式会社 | Study programs and methods |
JP7322620B2 (en) | 2019-09-13 | 2023-08-08 | 富士通株式会社 | Information processing device, information processing method and information processing program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5772442B2 (en) * | 2011-09-22 | 2015-09-02 | 富士ゼロックス株式会社 | Image processing apparatus and image processing program |
JP2015215837A (en) * | 2014-05-13 | 2015-12-03 | 株式会社デンソー | Arithmetic processor |
-
2016
- 2016-03-01 JP JP2016038956A patent/JP6561877B2/en active Active
-
2017
- 2017-01-18 WO PCT/JP2017/001554 patent/WO2017149971A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2017149971A1 (en) | 2017-09-08 |
JP2017156941A (en) | 2017-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6561877B2 (en) | Arithmetic processing unit | |
US11244432B2 (en) | Image filtering based on image gradients | |
JP2015215837A (en) | Arithmetic processor | |
CN110688088B (en) | General nonlinear activation function computing device and method for neural network | |
JP6365258B2 (en) | Arithmetic processing unit | |
US7636451B2 (en) | Digital watermark embedding apparatus and method, and digital watermark detection apparatus and method | |
JP2015210709A (en) | Arithmetic processing unit | |
JP6414458B2 (en) | Arithmetic processing unit | |
CN101561926B (en) | Image processing apparatus, image-capturing apparatus, image processing method and program | |
JP2023541350A (en) | Table convolution and acceleration | |
JP2019091439A5 (en) | Image data interpolation method | |
CN115004220B (en) | Neural network for raw low-light image enhancement | |
JP5071282B2 (en) | Bit selection circuit | |
US11461633B2 (en) | Semiconductor device and image recognition system | |
JP7274180B2 (en) | Program, Neural Network Processing Computer, Neural Network Processing Apparatus, and Neural Network Operation Method | |
CN110738625B (en) | Image resampling method, device, terminal and computer readable storage medium | |
KR20010004946A (en) | Method and Apparatus for high speed Convolution | |
CN112200299B (en) | Neural network computing device, data processing method and device | |
CN103514589A (en) | Filtering method in image recovery | |
JP5589628B2 (en) | Inner product calculation device and inner product calculation method | |
JP2020086680A (en) | Arithmetic operation device | |
JP3209420B2 (en) | Convolution processing method and apparatus | |
Mishra et al. | Noise removing filters and its implementation on FPGA | |
CN112308199B (en) | Data block processing method, device and storage medium | |
CN110570444B (en) | Threshold calculation method based on Box Filter algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180412 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20190625 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190708 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6561877 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |