JP6956796B2 - 演算回路、演算方法、およびプログラム - Google Patents
演算回路、演算方法、およびプログラム Download PDFInfo
- Publication number
- JP6956796B2 JP6956796B2 JP2019541561A JP2019541561A JP6956796B2 JP 6956796 B2 JP6956796 B2 JP 6956796B2 JP 2019541561 A JP2019541561 A JP 2019541561A JP 2019541561 A JP2019541561 A JP 2019541561A JP 6956796 B2 JP6956796 B2 JP 6956796B2
- Authority
- JP
- Japan
- Prior art keywords
- arithmetic
- vector
- coefficient matrix
- multiplication
- unit
- 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
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/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2413—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
- G06F18/24133—Distances to prototypes
-
- 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
- G06N3/045—Combinations of networks
-
- 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
- G06N3/048—Activation functions
-
- 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/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/94—Hardware or software architectures specially adapted for image or video understanding
- G06V10/955—Hardware or software architectures specially adapted for image or video understanding using specific electronic processors
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Computational Mathematics (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Neurology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Multimedia (AREA)
- Complex Calculations (AREA)
Description
[CNNについて]
最初にCNNについて簡単に説明する。図1は、CNNによる演算処理を示すフローチャートである。
図2は、畳み込み演算について説明するための図である。図2に示すように、入力特徴マップとしての入力データ100とカーネル101との畳み込み演算によって出力データ102が生成される。出力データ102の各要素にバイアスを加算し、さらに活性化関数を施すことによって出力特徴マップが生成される。活性化関数として、たとえば、ReLU(Rectified Linear Unit)などの非線形関数が用いられる。
図3は、特徴マップおよびカーネルの展開について説明するための図である。本実施の形態の場合、畳み込み演算の処理時間を短縮するために、特徴マップの各行をつなぎ合わせることによって特徴マップが1列に展開される。
上記(1)式で示される行列演算は、複数の演算器を含む並列計算機によって実行することができる。以下、汎用的な並列計算機の構成例を示す。図4の例と異なり、互いに並列処理可能な演算器を複数備えたASIC(Application Specific Integrated Circuit)によって上記の(1)式で示される行列演算を実行してもよい。
以下、畳み込み演算の手順の概要、特に(1)式の行列演算の手順の概略について説明する。
図6は、畳み込み演算の手順の詳細を示すフローチャートである。
以下、数値例を挙げて、図6の畳み込み演算の手順をさらに詳しく説明する。具体的に、係数行列A、入力ベクトルx、およびバイアスベクトルbを以下の(3)式のように設定する。
以上のように、実施の形態1によれば、係数行列Aの非零要素を検索し、検索結果に基づいて、各非零要素について単位積和演算が各演算器に分配されて実行される。これによって、各演算器における単位積和演算の処理数を平準化できるので、複数の演算器による積和演算を効率的に実行することができる。
図6に示すフローチャートのステップS110では、n個ある演算器CLは、行番号の格納用配列AROW(p)および列番号の格納用配列ACOL(p)を通じてn行m列の係数行列Aに一斉にアクセスする。このため、大規模な係数行列Aの処理負荷が高くなるという問題がある。そこで、実施の形態2においては行番号の格納用配列AROW(p)および列番号の格納用配列ACOL(p)を通じてn行m列の係数行列Aにアクセスするのではなく、零要素を除いた係数配列A’(係数ベクトルA’とも称する)を新しく定義し、n個ある演算器CLを係数配列A’にアクセスするようにする。これによって、n行m列の係数行列Aへのアクセスの集中を防止することができる。
Claims (6)
- 非零要素と零要素とを含む係数行列に右から入力ベクトルを掛け、演算結果を出力ベクトルに出力するための演算回路であって、制御プロセッサと、互いに並列処理可能な複数の演算器とを備え、
前記制御プロセッサは、前記係数行列に含まれる各非零要素と前記入力ベクトルの対応する要素との乗算を処理単位として、各前記演算器での処理単位数ができるだけ均等になるように当該乗算を各前記演算器に割り当てるように構成され、
各前記演算器は、割り当てられた前記乗算を順次実行し、前記乗算の結果を前記出力ベクトルの対応する要素に積算するように構成され、
前記演算回路は、畳み込みニューラルネットワークにおける畳み込み層の演算を実行するためのものであり、
前記入力ベクトルは、前記畳み込み層に入力される特徴マップを一列に展開したものであり、
前記係数行列は、前記畳み込み層で利用されるカーネルに対応する、演算回路。 - 前記係数行列に含まれる非零要素のみを取り出して格納するための係数ベクトルをさらに備え、
各前記演算器は、前記係数ベクトルから取り出した対応の非零要素を使用することによって、前記乗算を実行するように構成される、請求項1に記載の演算回路。 - 畳み込みニューラルネットワークにおける畳み込み層の演算方法であって、
前記畳み込み層に入力される特徴マップを一列に展開することによって得られる入力ベクトルに対応するように、前記畳み込み層で使用されるカーネルを変換することによって係数行列を生成するステップと、
前記係数行列に含まれる非零要素を検索するステップと、
前記係数行列に含まれる各非零要素と前記入力ベクトルの対応する要素との乗算を処理単位とし、互いに並列処理可能な複数の演算器の各々での処理単位数ができるだけ均等になるように、当該乗算を各前記演算器に割り当てるステップと、
各前記演算器が割当てられた前記乗算を順次実行し、前記乗算の結果を出力ベクトルの対応する要素に積算するステップとを備える、演算方法。 - 前記出力ベクトルの初期値としてバイアスベクトルを入力するステップをさらに備える、請求項3に記載の演算方法。
- 前記係数行列に含まれる非零要素のみを取り出して係数ベクトルに格納するステップをさらに備え、
各前記演算器は、前記係数ベクトルから取り出した対応の非零要素を使用することによって、前記乗算を実行する、請求項3または4に記載の演算方法。 - 請求項3〜5のいずれか1項に記載の演算方法をコンピュータに実行させるためのプログラム。
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2017/033225 WO2019053835A1 (ja) | 2017-09-14 | 2017-09-14 | 演算回路、演算方法、およびプログラム |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2019053835A1 JPWO2019053835A1 (ja) | 2020-10-01 |
JP6956796B2 true JP6956796B2 (ja) | 2021-11-02 |
Family
ID=65723958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019541561A Active JP6956796B2 (ja) | 2017-09-14 | 2017-09-14 | 演算回路、演算方法、およびプログラム |
Country Status (5)
Country | Link |
---|---|
US (1) | US11281746B2 (ja) |
JP (1) | JP6956796B2 (ja) |
CN (1) | CN111052111A (ja) |
DE (1) | DE112017008040T5 (ja) |
WO (1) | WO2019053835A1 (ja) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107633295B (zh) * | 2017-09-25 | 2020-04-28 | 南京地平线机器人技术有限公司 | 用于适配神经网络的参数的方法和装置 |
US11636327B2 (en) * | 2017-12-29 | 2023-04-25 | Intel Corporation | Machine learning sparse computation mechanism for arbitrary neural networks, arithmetic compute microarchitecture, and sparsity for training mechanism |
US11487846B2 (en) * | 2018-05-04 | 2022-11-01 | Apple Inc. | Performing multiply and accumulate operations in neural network processor |
JP7199283B2 (ja) * | 2019-03-28 | 2023-01-05 | 三菱電機株式会社 | アクセラレータ装置 |
CN110991619A (zh) * | 2019-12-09 | 2020-04-10 | Oppo广东移动通信有限公司 | 神经网络处理器、芯片和电子设备 |
JP6872599B1 (ja) * | 2019-12-23 | 2021-05-19 | 三菱電機マイコン機器ソフトウエア株式会社 | ニューラルネットワーク処理装置 |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0748207B2 (ja) * | 1989-04-14 | 1995-05-24 | シャープ株式会社 | 行列演算装置 |
JP2825133B2 (ja) * | 1989-09-20 | 1998-11-18 | 富士通株式会社 | 並列データ処理方式 |
TW325552B (en) * | 1996-09-23 | 1998-01-21 | Advanced Risc Mach Ltd | Data processing condition code flags |
JP2888292B2 (ja) | 1997-07-24 | 1999-05-10 | 日本電気株式会社 | 2次元逆離散コサイン変換(idct)装置 |
JP2003122736A (ja) * | 2001-10-11 | 2003-04-25 | Matsushita Electric Ind Co Ltd | 行列演算装置 |
JP4014512B2 (ja) * | 2002-02-12 | 2007-11-28 | 株式会社リバーベル | 画像改質処理方法およびその装置、プログラム、並びにデータ記録媒体 |
CN1682214A (zh) * | 2003-03-07 | 2005-10-12 | 松下电器产业株式会社 | 矩阵运算装置 |
JP3981399B1 (ja) * | 2006-03-10 | 2007-09-26 | 松下電器産業株式会社 | 固定符号帳探索装置および固定符号帳探索方法 |
EP1989683B1 (en) * | 2006-02-22 | 2017-05-31 | Koninklijke Philips N.V. | Image reconstruction using data ordering |
CN101136882B (zh) * | 2006-10-25 | 2010-05-19 | 中兴通讯股份有限公司 | 无线通信基带处理的系统矩阵计算方法和装置 |
JP5376920B2 (ja) | 2008-12-04 | 2013-12-25 | キヤノン株式会社 | コンボリューション演算回路、階層的コンボリューション演算回路及び物体認識装置 |
CN101533387A (zh) * | 2009-04-24 | 2009-09-16 | 西安电子科技大学 | 基于fpga的边角块稀疏矩阵并行lu分解器 |
CN102541814B (zh) * | 2010-12-27 | 2015-10-14 | 北京国睿中数科技股份有限公司 | 用于数据通信处理器的矩阵计算装置和方法 |
US20160358069A1 (en) * | 2015-06-03 | 2016-12-08 | Samsung Electronics Co., Ltd. | Neural network suppression |
CN106445471B (zh) * | 2016-10-13 | 2018-06-01 | 北京百度网讯科技有限公司 | 处理器和用于在处理器上执行矩阵乘运算的方法 |
US20180330275A1 (en) * | 2017-05-09 | 2018-11-15 | Microsoft Technology Licensing, Llc | Resource-efficient machine learning |
-
2017
- 2017-09-14 CN CN201780094576.0A patent/CN111052111A/zh active Pending
- 2017-09-14 WO PCT/JP2017/033225 patent/WO2019053835A1/ja active Application Filing
- 2017-09-14 US US16/633,845 patent/US11281746B2/en active Active
- 2017-09-14 JP JP2019541561A patent/JP6956796B2/ja active Active
- 2017-09-14 DE DE112017008040.1T patent/DE112017008040T5/de active Pending
Also Published As
Publication number | Publication date |
---|---|
WO2019053835A1 (ja) | 2019-03-21 |
US20210149983A1 (en) | 2021-05-20 |
DE112017008040T5 (de) | 2020-07-09 |
US11281746B2 (en) | 2022-03-22 |
JPWO2019053835A1 (ja) | 2020-10-01 |
CN111052111A (zh) | 2020-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6956796B2 (ja) | 演算回路、演算方法、およびプログラム | |
US11568258B2 (en) | Operation method | |
US20180260709A1 (en) | Calculating device and method for a sparsely connected artificial neural network | |
CN110288030B (zh) | 基于轻量化网络模型的图像识别方法、装置及设备 | |
US8761496B2 (en) | Image processing apparatus for calculating a degree of similarity between images, method of image processing, processing apparatus for calculating a degree of approximation between data sets, method of processing, computer program product, and computer readable medium | |
JP2015197702A (ja) | 情報処理装置、情報処理方法 | |
JP6822581B2 (ja) | 情報処理装置、情報処理方法及びプログラム | |
CN111260020A (zh) | 卷积神经网络计算的方法和装置 | |
US20220415007A1 (en) | Image normalization processing | |
CN113407820A (zh) | 模型训练方法及相关系统、存储介质 | |
JP7150651B2 (ja) | ニューラルネットワークのモデル縮約装置 | |
CN111753995A (zh) | 一种基于梯度提升树的局部可解释方法 | |
JP6906622B2 (ja) | 演算回路および演算方法 | |
Bhattacharjya et al. | A genetic algorithm for intelligent imaging from quantum-limited data | |
WO2017198169A1 (en) | Reduction of parameters in fully connected layers of neural networks | |
JP5396977B2 (ja) | データ処理装置、データ処理方法およびプログラム | |
US20200410340A1 (en) | Information processing device and information processing method | |
CN115601513A (zh) | 一种模型超参数的选择方法及相关装置 | |
WO2023085195A1 (ja) | モデル生成装置、モデル生成方法及びデータ推定装置 | |
JP7455769B2 (ja) | 情報処理装置、情報処理方法、プログラム、および情報処理システム | |
WO2024100709A1 (ja) | 最適化装置、最適化方法及びプログラム | |
TWI659324B (zh) | 電路規劃結果產生方法與系統 | |
Melo et al. | Quantum-inspired evolutionary algorithm and differential evolution used in the adaptation of segmentation parameters | |
CN115222039A (zh) | 预训练语言模型的稀疏训练方法和深度语言计算系统 | |
CN114254618A (zh) | 基于动态路由注意力机制的视觉问答方法、存储介质及设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200304 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200304 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210323 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210517 |
|
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: 20210907 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211005 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6956796 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |