JP2021099596A - Information processing apparatus - Google Patents

Information processing apparatus Download PDF

Info

Publication number
JP2021099596A
JP2021099596A JP2019230385A JP2019230385A JP2021099596A JP 2021099596 A JP2021099596 A JP 2021099596A JP 2019230385 A JP2019230385 A JP 2019230385A JP 2019230385 A JP2019230385 A JP 2019230385A JP 2021099596 A JP2021099596 A JP 2021099596A
Authority
JP
Japan
Prior art keywords
calculation
load
layer
neural network
intermediate layer
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.)
Granted
Application number
JP2019230385A
Other languages
Japanese (ja)
Other versions
JP7373387B2 (en
Inventor
夏軌 横山
Natsuki Yokoyama
夏軌 横山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Ten Ltd
Original Assignee
Denso Ten Ltd
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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2019230385A priority Critical patent/JP7373387B2/en
Publication of JP2021099596A publication Critical patent/JP2021099596A/en
Application granted granted Critical
Publication of JP7373387B2 publication Critical patent/JP7373387B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

To provide an information processing apparatus which can execute processing using a neural network and other processing in parallel without increasing arithmetic processing capability.SOLUTION: In an information processing apparatus 1, an operation unit 11 executes operations of a neural network 20 including a plurality of intermediate layers and operations of a prescribed program different from the neural network. An operation object selection unit 12 selects an intermediate layer where an operation should be performed, from the plurality of intermediate layers on the basis of a structure of the neural network 20, operation amount data indicative of respective operation amounts of the plurality of intermediate layers, and load of the operation unit 11. An operation instruction unit 13 instructs the operation unit 11 to perform the operation of the intermediate layer selected by the operation object selection unit 12.SELECTED DRAWING: Figure 1

Description

本発明は、ニューラルネットワークに関する演算を実行する情報処理装置に関する。 The present invention relates to an information processing device that executes operations related to a neural network.

人工知能を自動車等の車両に搭載するための研究が進められている。例えば、特許文献1は、車両の走行状態に基づいて人工知能モデルを構成し、構成した人工知能モデルを用いた処理を実行する車両電子制御装置を開示している。特許文献1において、ニューラルネットワークが、人工知能モデルとして用いられる。 Research is underway to mount artificial intelligence on vehicles such as automobiles. For example, Patent Document 1 discloses a vehicle electronic control device that constructs an artificial intelligence model based on a running state of a vehicle and executes processing using the constructed artificial intelligence model. In Patent Document 1, a neural network is used as an artificial intelligence model.

特開2018−190045号公報JP-A-2018-190045

ニューラルネットワークの演算量は、ニューラルネットワークの規模に応じて増加する。車両電子制御装置等の情報処理装置が、比較的規模の大きいニューラルネットワークを用いた処理を実行する場合、情報処理装置の負荷が高くなる。情報処理装置の負荷が高くなった場合、情報処理装置がニューラルネットワークを用いた処理以外のその他の処理を実行できない虞がある。 The amount of calculation of the neural network increases according to the scale of the neural network. When an information processing device such as a vehicle electronic control device executes processing using a relatively large-scale neural network, the load on the information processing device becomes high. When the load on the information processing device becomes high, the information processing device may not be able to perform other processing other than the processing using the neural network.

ニューラルネットワークを用いた処理とその他の処理とを並行して実行するために、演算処理能力の高い情報処理装置を採用することが考えられる。しかし、演算処理能力の高い情報処理装置の採用は、コスト増加の要因となる。 In order to execute processing using a neural network and other processing in parallel, it is conceivable to adopt an information processing device having high arithmetic processing power. However, the adoption of an information processing device having high computing power causes an increase in cost.

上記問題点に鑑み、本発明は、_Hlk27417505演算処理能力を高めることなく、ニューラルネットワークを用いた処理とその他の処理とを並行して実行することが可能な情報処理装置を提供することを目的とする。 In view of the above problems, an object of the present invention is to provide an information processing apparatus capable of executing processing using a neural network and other processing in parallel without increasing the arithmetic processing capacity of _Hlk27417505. To do.

上記課題を解決するため、第1の発明は、情報処理装置であって、演算部と、演算対象選択部と、演算指示部とを備える。演算部は、複数の中間層を含むニューラルネットワークの演算と、ニューラルネットワークと異なる所定のプログラムの演算とを実行する。演算対象選択部は、ニューラルネットワークの構造と、複数の中間層の各々における演算量を示す演算量データと、演算部の負荷とに基づいて、複数の中間層のうち演算すべき中間層を選択する。演算指示部は、演算対象選択部により選択された中間層の演算を演算部に指示する。 In order to solve the above problems, the first invention is an information processing apparatus, which includes a calculation unit, a calculation target selection unit, and a calculation instruction unit. The arithmetic unit executes an arithmetic of a neural network including a plurality of intermediate layers and an arithmetic of a predetermined program different from the neural network. The calculation target selection unit selects an intermediate layer to be calculated from a plurality of intermediate layers based on the structure of the neural network, the calculation amount data indicating the calculation amount in each of the plurality of intermediate layers, and the load of the calculation unit. To do. The calculation instruction unit instructs the calculation unit to perform the calculation of the intermediate layer selected by the calculation target selection unit.

第1の発明によれば、演算処理能力を高めることなく、ニューラルネットワークを用いた処理とその他の処理とを並行して実行することが可能なとなる。 According to the first invention, it is possible to execute a process using a neural network and other processes in parallel without increasing the arithmetic processing capacity.

第2の発明は、第1の発明であって、演算対象選択部は、ニューラルネットワークの演算により発生する演算部の負荷と、所定のプログラム演算により発生する演算部の負荷との合計が、予め設定された演算部の負荷の上限を超えないように、演算すべき中間層を選択する。 The second invention is the first invention, and in the calculation target selection unit, the total of the load of the calculation unit generated by the calculation of the neural network and the load of the calculation unit generated by the predetermined program calculation is calculated in advance. Select the intermediate layer to be calculated so as not to exceed the set upper limit of the load of the calculation unit.

第2の発明によれば、ニューラルネットワークの演算時に演算部の負荷の上限を超えることが抑制されるため、ニューラルネットワークの演算が予定よりも長くなることを防ぐことができる。 According to the second invention, it is possible to prevent the calculation of the neural network from becoming longer than planned because the upper limit of the load of the calculation unit is suppressed during the calculation of the neural network.

第3の発明は、第1又は第2の発明であって、複数の中間層は、第1中間層と、第2中間層とを含む。第2中間層は、第1中間層の演算結果から独立している。演算対象選択部は、第1中間層の演算により発生する演算部の負荷と第2中間層の演算により発生する演算部の負荷と所定のプログラムの演算により発生する演算部の負荷との合計が演算部の負荷の上限を超えない場合、第1中間層及び第2中間層を演算すべき中間層として選択する。 The third invention is the first or second invention, in which the plurality of intermediate layers includes a first intermediate layer and a second intermediate layer. The second intermediate layer is independent of the calculation result of the first intermediate layer. The calculation target selection unit is the sum of the load of the calculation unit generated by the calculation of the first intermediate layer, the load of the calculation unit generated by the calculation of the second intermediate layer, and the load of the calculation unit generated by the calculation of a predetermined program. When the upper limit of the load of the calculation unit is not exceeded, the first intermediate layer and the second intermediate layer are selected as the intermediate layers to be calculated.

第3の発明によれば、2つ以上の中間層の演算とその他の処理とを並行して実行できるため、ニューラルネットワークの演算完了を早めることができる。 According to the third invention, since the calculation of two or more intermediate layers and other processing can be executed in parallel, the completion of the calculation of the neural network can be accelerated.

第4の発明は、第1〜第3の発明のいずれかであって、演算部は、第1中間層を含む第1ニューラルネットワークと、第2中間層を含む第2ニューラルネットワークとを演算する。演算対象選択部は、レイヤ特定部は、第1中間層の演算により発生する演算部の負荷と第2中間層の演算により発生する演算部の負荷と所定のプログラムの演算により発生する演算部の負荷との合計が演算部の負荷の上限を超えない場合、第1中間層及び第2中間層を演算すべき中間層として特定する。 The fourth invention is any one of the first to third inventions, and the arithmetic unit calculates the first neural network including the first intermediate layer and the second neural network including the second intermediate layer. .. In the calculation target selection unit, the layer identification unit is a load of the calculation unit generated by the calculation of the first intermediate layer, a load of the calculation unit generated by the calculation of the second intermediate layer, and a calculation unit generated by the calculation of a predetermined program. When the total with the load does not exceed the upper limit of the load of the calculation unit, the first intermediate layer and the second intermediate layer are specified as the intermediate layers to be calculated.

第4の発明によれば、2つのニューラルネットワークと、その他の処理とを並行して実行することができる。 According to the fourth invention, the two neural networks and other processes can be executed in parallel.

第5の発明は、複数の中間層を含むニューラルネットワークの演算と、ニューラルネットワークと異なる所定のプログラムの演算とを実行する演算部を備える情報処理装置の制御方法であって、a)ステップと、b)ステップとを備える。a)ステップは、ニューラルネットワークの構造と、複数の中間層の各々における演算量を示す演算量データと、演算部の負荷とに基づいて、複数の中間層のうち演算すべき中間層を選択する。b)ステップは、選択された中間層の演算を演算部に指示する。 A fifth invention is a control method of an information processing apparatus including an arithmetic unit that executes an operation of a neural network including a plurality of intermediate layers and an operation of a predetermined program different from the neural network. b) Provide with steps. a) In the step, the intermediate layer to be calculated is selected from the plurality of intermediate layers based on the structure of the neural network, the calculation amount data indicating the calculation amount in each of the plurality of intermediate layers, and the load of the calculation unit. .. b) The step instructs the calculation unit to perform the calculation of the selected intermediate layer.

第5の発明は、第1の発明に用いられる。 The fifth invention is used in the first invention.

本発明は、演算処理能力を高めることなく、ニューラルネットワークを用いた処理とその他の処理とを並行して実行することが可能な情報処理装置を提供することができる。 The present invention can provide an information processing apparatus capable of executing processing using a neural network and other processing in parallel without increasing the arithmetic processing capacity.

本発明の第1の実施の形態に係る情報処理システムの構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the information processing system which concerns on 1st Embodiment of this invention. 図1に示す情報処理装置のハードウェア構成を示す図である。It is a figure which shows the hardware configuration of the information processing apparatus shown in FIG. 図1に示すニューラルネットワークの構成の一例を示す概略図である。It is the schematic which shows an example of the structure of the neural network shown in FIG. 図1に示す演算量データ52の一例を示す図である。It is a figure which shows an example of the arithmetic amount data 52 shown in FIG. 図3に示す畳み込み層の演算量の計算方法を説明する図である。It is a figure explaining the calculation method of the arithmetic amount of the convolution layer shown in FIG. 図1に示す情報処理装置の負荷のうち、ニューラルネットワークの演算により発生する負荷を除いた一般負荷の時間変化の一例を示すグラフである。It is a graph which shows an example of the time change of the general load excluding the load generated by the calculation of the neural network among the loads of the information processing apparatus shown in FIG. 図1に示す情報処理装置の動作を示すフローチャートである。It is a flowchart which shows the operation of the information processing apparatus shown in FIG. 本発明の第2の実施の形態に係る情報処理システムの構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the information processing system which concerns on 2nd Embodiment of this invention. 図8に示すニューラルネットワークの構成を示す概略図である。It is the schematic which shows the structure of the neural network shown in FIG. 図8に示す情報処理装置の負荷のうち、ニューラルネットワークの演算により発生する負荷を除いた一般負荷の時間変化の一例を示すグラフである。It is a graph which shows an example of the time change of the general load excluding the load generated by the calculation of the neural network among the loads of the information processing apparatus shown in FIG. ニューラルネットワークをブロック線図に変換する一例を示す図である。It is a figure which shows an example which converts a neural network into a block diagram. ニューラルネットワークの構成の一例を示す図である。It is a figure which shows an example of the structure of a neural network. 図12に示すニューラルネットワークを隣接行列として表した図である。It is a figure which represented the neural network shown in FIG. 12 as an adjacency matrix. 図12に示すニューラルネットワークを変換したブロック図である。It is a block diagram which converted the neural network shown in FIG. ニューラルネットワークを変換したブロック線図の他の例である。This is another example of a block diagram converted from a neural network. 図15に示すブロック線図をグラフ化した図である。It is a figure which graphed the block diagram shown in FIG. 図16に示された処理依存関係に基づく並列処理の割り当ての手順を示す図である。It is a figure which shows the procedure of the allocation of parallel processing based on the processing dependency shown in FIG.

以下、図面を参照し、本発明の実施の形態を詳しく説明する。図中同一又は相当部分には同一符号を付してその説明は繰り返さない。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The same or corresponding parts in the drawings are designated by the same reference numerals, and the description thereof will not be repeated.

[第1の実施の形態]
{1.構成}
{1.1.情報処理システム100の構成}
図1は、本発明の一実施の形態に係る情報処理システム100の構成を示す機能ブロック図である。図1を参照して、情報処理システム100は、情報処理装置1と、記憶装置2とを備える。
[First Embodiment]
{1. Constitution}
{1.1. Configuration of information processing system 100}
FIG. 1 is a functional block diagram showing a configuration of an information processing system 100 according to an embodiment of the present invention. With reference to FIG. 1, the information processing system 100 includes an information processing device 1 and a storage device 2.

情報処理装置1は、図示しない車両に搭載される電子制御装置(Electronic Control Unit)である。本実施の形態において、情報処理装置1は、画像認識装置である。情報処理装置1は、車両の前方を撮影した前方画像61を車両に搭載されたカメラから取得し、歩行者をその取得した前方画像61から検出する。前方画像61は、動画像に含まれるフレームである。情報処理装置1は、歩行者の検出結果を示す結果データ62を生成し、図示しないカーナビゲーション装置に出力する。 The information processing device 1 is an electronic control unit (Electronic Control Unit) mounted on a vehicle (not shown). In the present embodiment, the information processing device 1 is an image recognition device. The information processing device 1 acquires a front image 61 of the front of the vehicle from a camera mounted on the vehicle, and detects a pedestrian from the acquired front image 61. The front image 61 is a frame included in the moving image. The information processing device 1 generates result data 62 indicating a pedestrian detection result and outputs the result data 62 to a car navigation device (not shown).

記憶装置2は、不揮発性の記憶装置であり、例えば、フラッシュメモリである。記憶装置2は、ニューラルネットワーク20と、前処理プログラム41と、結果出力プログラム42と、制御プログラム43と、演算量データ52とを記憶する。 The storage device 2 is a non-volatile storage device, for example, a flash memory. The storage device 2 stores the neural network 20, the preprocessing program 41, the result output program 42, the control program 43, and the calculation amount data 52.

ニューラルネットワーク20と、前処理プログラム41と、結果出力プログラム42とは、画像認識処理のためのプログラムであり、演算部11により実行される。ニューラルネットワーク20は、本実施の形態では、歩行者を検出するために用いられる。ニューラルネットワーク20の構成については、後述する。演算量データ52は、ニューラルネットワーク20に含まれる複数の中間層の各々の演算量を記録する。 The neural network 20, the preprocessing program 41, and the result output program 42 are programs for image recognition processing, and are executed by the arithmetic unit 11. The neural network 20 is used in this embodiment to detect a pedestrian. The configuration of the neural network 20 will be described later. The calculation amount data 52 records the calculation amount of each of the plurality of intermediate layers included in the neural network 20.

前処理プログラム41は、前方画像61をニューラルネットワーク20に入力するために、前方画像61のサイズを調整する等の前処理を実行する。結果出力プログラム42は、ニューラルネットワーク20の検出結果に基づいて、結果データ62を生成する。制御プログラム43は、情報処理装置1全体の制御に用いられ、画像認識処理に関する処理以外の処理を実行する。 The preprocessing program 41 executes preprocessing such as adjusting the size of the front image 61 in order to input the front image 61 to the neural network 20. The result output program 42 generates the result data 62 based on the detection result of the neural network 20. The control program 43 is used to control the entire information processing apparatus 1, and executes a process other than the process related to the image recognition process.

{1.2.情報処理装置1の構成}
図1を参照して、情報処理装置1は、演算部11と、演算対象選択部12と、演算指示部13とを備える。
{1.2. Configuration of information processing device 1}
With reference to FIG. 1, the information processing apparatus 1 includes a calculation unit 11, a calculation target selection unit 12, and a calculation instruction unit 13.

演算部11は、ニューラルネットワーク20の演算と、前処理プログラム41の演算と、結果出力プログラム42の演算と、制御プログラム43の演算とを実行する。 The calculation unit 11 executes the calculation of the neural network 20, the calculation of the preprocessing program 41, the calculation of the result output program 42, and the calculation of the control program 43.

演算対象選択部12は、ニューラルネットワーク20の構造と、演算量データ52とに基づいて、ニューラルネットワーク20に含まれる複数の中間層のうち演算すべき中間層を選択する。 The calculation target selection unit 12 selects an intermediate layer to be calculated from a plurality of intermediate layers included in the neural network 20 based on the structure of the neural network 20 and the calculation amount data 52.

演算指示部13は、演算対象選択部12により選択された中間層の演算を演算部11に指示する。 The calculation instruction unit 13 instructs the calculation unit 11 to perform the calculation of the intermediate layer selected by the calculation target selection unit 12.

図2は、図1に示す情報処理装置1のハードウェア構成を示す図である。図2を参照して、情報処理装置1は、CPU(Central Processing Unit)101と、RAM(Random access memory)102と、ROM(Read only memory)103と、入力部104と、出力部105とを備える。 FIG. 2 is a diagram showing a hardware configuration of the information processing device 1 shown in FIG. With reference to FIG. 2, the information processing unit 1 includes a CPU (Central Processing Unit) 101, a RAM (Random access memory) 102, a ROM (Read only memory) 103, an input unit 104, and an output unit 105. Be prepared.

CPU101は、RAM102にロードされたプログラムを実行することにより、情報処理装置1を制御する。CPU101は、演算部11として機能する。また、CPU101は、制御プログラム43を実行することにより、演算対象選択部12及び演算指示部13として機能する。 The CPU 101 controls the information processing device 1 by executing a program loaded in the RAM 102. The CPU 101 functions as a calculation unit 11. Further, the CPU 101 functions as a calculation target selection unit 12 and a calculation instruction unit 13 by executing the control program 43.

RAM102は、情報処理装置1のメインメモリである。ROM103は、情報処理装置1のBIOS(Basic Input/Output System)を記憶する。 The RAM 102 is the main memory of the information processing device 1. The ROM 103 stores the BIOS (Basic Input / Output System) of the information processing device 1.

入力部104は、前方画像61及び記憶装置2に記憶されたプログラム等を取得し、その取得したデータをRAM102に供給する。出力部105は、CPU101による演算結果を情報処理装置1に接続された外部装置に供給する。演算結果は、例えば、歩行者の検出結果を示す結果データ62である。 The input unit 104 acquires the program and the like stored in the front image 61 and the storage device 2, and supplies the acquired data to the RAM 102. The output unit 105 supplies the calculation result of the CPU 101 to the external device connected to the information processing device 1. The calculation result is, for example, result data 62 showing a pedestrian detection result.

{1.3.ニューラルネットワーク20の構成}
図3は、図1に示すニューラルネットワーク20の構成を示す概略図である。図3を参照して、ニューラルネットワーク20は、入力層21と、畳み込み層22、23A、24A及び24Bと、プーリング層23B及び24Cと、全結合層25及び26と、出力層27とを備える。図3において、ニューラルネットワーク20が備えるノードの表示を省略している。
{1.3. Configuration of neural network 20}
FIG. 3 is a schematic view showing the configuration of the neural network 20 shown in FIG. With reference to FIG. 3, the neural network 20 includes an input layer 21, convolution layers 22, 23A, 24A and 24B, pooling layers 23B and 24C, fully connected layers 25 and 26, and an output layer 27. In FIG. 3, the display of the nodes included in the neural network 20 is omitted.

以下の説明において、畳み込み層22、23A、24A及び24Bと、プーリング層23B及び24Cと、全結合層25及び26とを総称して、「中間層20A」と記載する場合がある。 In the following description, the convolution layers 22, 23A, 24A and 24B, the pooling layers 23B and 24C, and the fully connected layers 25 and 26 may be collectively referred to as "intermediate layer 20A".

入力層21は、前処理された前方画像61の画素データを受け、その受けた前方画像61の画素データを畳み込み層22に供給する。 The input layer 21 receives the pixel data of the preprocessed front image 61, and supplies the received pixel data of the front image 61 to the convolution layer 22.

畳み込み層22は、入力層21から受けた画素データを畳み込み演算し、畳み込み演算の結果を畳み込み層23A及び24Aの各々に供給する。 The convolution layer 22 performs a convolution calculation on the pixel data received from the input layer 21, and supplies the result of the convolution calculation to each of the convolution layers 23A and 24A.

畳み込み層23Aは、畳み込み層22から受けた畳み込み演算の結果を、さらに畳み込み演算する。畳み込み層23Aは、畳み込み演算の結果をプーリング層23Bに供給する。プーリング層23Bは、畳み込み層23Aから受けた畳み込み演算の結果を統計的に処理し、その統計処理結果を全結合層25に供給する。 The convolution layer 23A further performs a convolution calculation based on the result of the convolution calculation received from the convolution layer 22. The convolution layer 23A supplies the result of the convolution calculation to the pooling layer 23B. The pooling layer 23B statistically processes the result of the convolution operation received from the convolution layer 23A, and supplies the statistical processing result to the fully connected layer 25.

畳み込み層24Aは、畳み込み層22から受けた畳み込み演算の結果を、さらに畳み込み演算する。畳み込み層24Aは、畳み込み演算の結果を畳み込み層24Bに供給する。畳み込み層24Bは、畳み込み層24Aから受けた畳み込み演算の結果を、さらに畳み込み演算する。畳み込み層24Bは、畳み込み演算の結果をプーリング層24Cに供給する。プーリング層24Cは、畳み込み層24Bから受けた畳み込み演算の結果を統計的に処理し、その統計処理結果を全結合層25に供給する。 The convolution layer 24A further performs a convolution calculation based on the result of the convolution calculation received from the convolution layer 22. The convolution layer 24A supplies the result of the convolution calculation to the convolution layer 24B. The convolution layer 24B further performs a convolution calculation based on the result of the convolution calculation received from the convolution layer 24A. The convolution layer 24B supplies the result of the convolution calculation to the pooling layer 24C. The pooling layer 24C statistically processes the result of the convolution operation received from the convolution layer 24B, and supplies the statistical processing result to the fully connected layer 25.

全結合層25は、プーリング層23B及び24Cの各々から統計処理結果を受け、その受けた統計処理結果を用いた演算を行う。全結合層25は、演算結果を全結合層26に供給する。全結合層26は、全結合層25から受けた演算結果をさらに演算し、その演算結果を出力層27に供給する。 The fully connected layer 25 receives statistical processing results from each of the pooling layers 23B and 24C, and performs an operation using the received statistical processing results. The fully connected layer 25 supplies the calculation result to the fully connected layer 26. The fully connected layer 26 further calculates the calculation result received from the fully connected layer 25, and supplies the calculation result to the output layer 27.

出力層27は、結合層27から受けた演算結果に基づいて、前方画像61から歩行者が検出されたか否かを示す歩行者検出結果28を出力する。歩行者検出結果28は、結果データ62の生成に用いられる。 The output layer 27 outputs a pedestrian detection result 28 indicating whether or not a pedestrian is detected from the front image 61 based on the calculation result received from the coupling layer 27. The pedestrian detection result 28 is used to generate the result data 62.

{1.4.ニューラルネットワーク20における依存関係}
ニューラルネットワーク20において、中間層20A及び出力層27の各々は、個別のプログラムである。つまり、演算部11は、中間層20A及び出力層27の各々を個別に演算することができる。中間層20Aに含まれる一の中間層の演算を開始するためには、一の中間層と依存関係にある全ての中間層の演算が終了している必要がある。
{1.4. Dependencies in Neural Network 20}
In the neural network 20, each of the intermediate layer 20A and the output layer 27 is a separate program. That is, the calculation unit 11 can individually calculate each of the intermediate layer 20A and the output layer 27. In order to start the calculation of one intermediate layer included in the intermediate layer 20A, it is necessary that the calculation of all the intermediate layers having a dependency relationship with the one intermediate layer is completed.

例えば、畳み込み層24Bは、畳み込み層22及び24Aと依存関係にある。従って、畳み込み層22及び24Aの演算が終了していなければ、畳み込み層24Bの演算を開始することができない。 For example, the convolution layer 24B is dependent on the convolution layers 22 and 24A. Therefore, the calculation of the convolution layer 24B cannot be started unless the calculation of the convolution layers 22 and 24A is completed.

ニューラルネットワーク20における依存関係について詳しく説明する。中間層20Aは、上流に位置する中間層と依存関係にある。上流とは、ニューラルネットワーク20に含まれる一の中間層から入力層21を見た方向を示す。下流とは、一の中間層から出力層27を見た方向を示す。 The dependency relationship in the neural network 20 will be described in detail. The intermediate layer 20A is dependent on the intermediate layer located upstream. “Upstream” indicates the direction in which the input layer 21 is viewed from one intermediate layer included in the neural network 20. Downstream refers to the direction in which the output layer 27 is viewed from one intermediate layer.

例えば、畳み込み層22及び23Aは、プーリング層23Bから見て上流に位置するため、プーリング層23Bは、畳み込み層22及び23Aに依存する。畳み込み層24A及び24Bとプーリング層24Cとは、プーリング層23Bの上流に位置しないため、プーリング層23Bは、畳み込み層24A及び24B及びプーリング層23Cに依存しない。 For example, since the convolution layers 22 and 23A are located upstream of the pooling layer 23B, the pooling layer 23B depends on the convolution layers 22 and 23A. Since the convolution layers 24A and 24B and the pooling layer 24C are not located upstream of the pooling layer 23B, the pooling layer 23B does not depend on the convolution layers 24A and 24B and the pooling layer 23C.

並列の位置関係にある2つの中間層は、互いに依存しない。具体的には、畳み込み層23A及びプーリング層23Bの各々は、畳み込み層24A、24B及びプーリング層24Cに依存しない。逆に、畳み込み層24A、24B及びプーリング層24Cは、畳み込み層23A及びプーリング層23Bに依存しない。 The two intermediate layers in parallel positional relationship do not depend on each other. Specifically, each of the convolution layer 23A and the pooling layer 23B does not depend on the convolution layers 24A and 24B and the pooling layer 24C. On the contrary, the convolution layers 24A and 24B and the pooling layer 24C do not depend on the convolution layer 23A and the pooling layer 23B.

{1.5.演算量データ52}
図4は、図1に示す演算量データ52の一例を示す図である。図4を参照して、演算量データ52は、ニューラルネットワーク20に含まれる中間層20A及び出力層27の各々の演算量を記録する。
{1.5. Computation data 52}
FIG. 4 is a diagram showing an example of the calculation amount data 52 shown in FIG. With reference to FIG. 4, the calculation amount data 52 records the calculation amount of each of the intermediate layer 20A and the output layer 27 included in the neural network 20.

演算量データ52に記録される演算量の算出について説明する。図5は、ニューラルネットワーク20に含まれる畳み込み層の演算量の計算方法を説明する図である。 The calculation of the calculation amount recorded in the calculation amount data 52 will be described. FIG. 5 is a diagram illustrating a method of calculating the calculation amount of the convolution layer included in the neural network 20.

図5を参照して、画像データ66が畳み込み層に入力される場合、画像データ66は、2次元の行列であり、画素値が行列の要素に相当する。この場合、入力データ66の水平方向のサイズ及び垂直方向のサイズは、Ir及びIcである。 When the image data 66 is input to the convolution layer with reference to FIG. 5, the image data 66 is a two-dimensional matrix, and the pixel values correspond to the elements of the matrix. In this case, the horizontal size and the vertical size of the input data 66 are Ir and Ic.

畳み込み層で用いられるフィルタ67の水平方向のサイズ及び垂直方向のサイズは、Fr及びFcである。フィルタ67は、少なくとも1つあればよい。フィルタ67の数は、Fnである。 The horizontal and vertical sizes of the filter 67 used in the convolution layer are Fr and Fc. There may be at least one filter 67. The number of filters 67 is Fn.

畳み込み層における演算において、パディングデータが入力データの外周に付加される。入力データ66にフィルタをかけるためである。パディングデータは、全て0である。パディングデータの上辺、下辺、右辺及び左辺サイズは、Pt、Pb、Pl、Prである。この結果、畳み込み層の演算量Nは、下記の式(1)により算出される。 In the calculation in the convolution layer, padding data is added to the outer circumference of the input data. This is to filter the input data 66. The padding data are all 0. The upper, lower, right and left side sizes of the padding data are Pt, Pb, Pl and Pr. As a result, the calculated amount N of the convolution layer is calculated by the following equation (1).

Figure 2021099596
Figure 2021099596

式(1)において、Shは、フィルタ67の水平方向のストライドであり、Svは、フィルタ67の垂直方向のストライドである。 In formula (1), Sh is the horizontal stride of the filter 67 and Sv is the vertical stride of the filter 67.

中間層が全結合層である場合、全結合層の演算量は、式(1)のFr,Fc、Sh及びSvを1に設定し、Pt、Pb、Pl及びPrを0に設定することにより計算される。 When the intermediate layer is a fully connected layer, the calculation amount of the fully connected layer is set by setting Fr, Fc, Sh and Sv of the equation (1) to 1 and setting Pt, Pb, Pl and Pr to 0. It is calculated.

プーリング層の演算量は、プーリング層で実行される統計処理の内容に応じて結締される。 The amount of calculation in the pooling layer is tightened according to the content of statistical processing executed in the pooling layer.

入力層21の演算量は、演算量データ52に記録されない。前処理された前方画像61の画素データは、入力層21において実質的に変化しない。入力層21が、前処理された前方画像61の画素データを畳み込み層22に単に受け渡すためであり、演算を行わないためである。 The calculation amount of the input layer 21 is not recorded in the calculation amount data 52. The pixel data of the preprocessed front image 61 does not substantially change in the input layer 21. This is because the input layer 21 simply passes the pixel data of the preprocessed front image 61 to the convolution layer 22, and does not perform the calculation.

{2.動作}
図6は、図2に示すCPU101の負荷のうち一般負荷55の時間変動の一例を示す図である。図6を参照して、一般負荷55とは、ニューラルネットワーク20の演算により発生する負荷を除いた負荷をCPU101の負荷から減算した数値である。一般負荷55は、前処理プログラム41と、結果出力プログラム42と、制御プログラム43との各々を実行することにより発生する負荷を含む。
{2. motion}
FIG. 6 is a diagram showing an example of time variation of the general load 55 among the loads of the CPU 101 shown in FIG. With reference to FIG. 6, the general load 55 is a numerical value obtained by subtracting the load excluding the load generated by the calculation of the neural network 20 from the load of the CPU 101. The general load 55 includes a load generated by executing each of the preprocessing program 41, the result output program 42, and the control program 43.

以下、図6を参照しながら、情報処理装置1が、CPU101の負荷に基づいて、演算対象の中間層を選択する処理を説明する。図6において、余裕負荷と、予想負荷と、合計予想負荷との大小関係を分かり易く示すために、余裕負荷と、予想負荷と、合計予想負荷とを負荷上限を基準に示している。余裕負荷と、予想負荷と、合計予想負荷については、後述する。 Hereinafter, the process in which the information processing apparatus 1 selects the intermediate layer to be calculated based on the load of the CPU 101 will be described with reference to FIG. In FIG. 6, in order to show the magnitude relationship between the margin load, the expected load, and the total expected load in an easy-to-understand manner, the margin load, the expected load, and the total expected load are shown with reference to the upper limit of the load. The margin load, the expected load, and the total expected load will be described later.

(時刻t11)
カメラから入力された前方画像61の前処理が、時刻t11において完了する。情報処理装置1は、ニューラルネットワーク20を用いた歩行者の検出処理を時刻t11から開始する。時刻t11において、演算対象選択部12は、複数の中間層20Aの中から、畳み込み層22を演算対象として選択する。
(Time t11)
The preprocessing of the front image 61 input from the camera is completed at time t11. The information processing device 1 starts the pedestrian detection process using the neural network 20 at time t11. At time t11, the calculation target selection unit 12 selects the convolution layer 22 as the calculation target from the plurality of intermediate layers 20A.

具体的には、演算対象選択部12は、時刻t11において、演算可能な中間層20Aが畳み込み層22であると判断する。前処理された前方画像61が入力層21を介して畳み込み層22に入力されるためである。 Specifically, the calculation target selection unit 12 determines that the calculationable intermediate layer 20A is the convolution layer 22 at time t11. This is because the preprocessed front image 61 is input to the convolution layer 22 via the input layer 21.

演算対象選択部12は、演算可能な畳み込み層22の演算量を演算量データ52から取得する。演算対象選択部12は、取得した演算量に基づいて、畳み込み層22の実行に伴って発生するCPU101の負荷を畳み込み層22の予想負荷221として計算する。CPU101の負荷は、CPU101のクロック数やコア数等に基づいて計算され、周知の方法を用いることができる。 The calculation target selection unit 12 acquires the calculation amount of the convolution layer 22 that can be calculated from the calculation amount data 52. The calculation target selection unit 12 calculates the load of the CPU 101 generated by the execution of the convolution layer 22 as the expected load 221 of the convolution layer 22 based on the acquired calculation amount. The load of the CPU 101 is calculated based on the number of clocks, the number of cores, and the like of the CPU 101, and a well-known method can be used.

演算対象選択部12は、時刻t11における一般負荷55と予め設定された上限負荷とに基づいて、時刻t11における余裕負荷551を算出する。図6に示すように、上限負荷は、本実施の形態において90%である。 The calculation target selection unit 12 calculates the margin load 551 at time t11 based on the general load 55 at time t11 and the preset upper limit load. As shown in FIG. 6, the upper limit load is 90% in this embodiment.

演算対象選択部12は、計算した予想負荷221を時刻t11における余裕負荷5511と比較する。計算した予想負荷221が時刻t11における余裕負荷551より以下である場合、演算対象選択部12は、畳み込み層22を演算対象として選択する。 The calculation target selection unit 12 compares the calculated expected load 221 with the margin load 5511 at time t11. When the calculated expected load 221 is less than or equal to the margin load 551 at time t11, the calculation target selection unit 12 selects the convolution layer 22 as the calculation target.

演算指示部13は、演算対象選択部12により選択された畳み込み層22の演算開始を演算部11に指示する。演算部11は、演算指示部13の指示に応じて、畳み込み層22の演算を開始する。 The calculation instruction unit 13 instructs the calculation unit 11 to start the calculation of the convolution layer 22 selected by the calculation target selection unit 12. The calculation unit 11 starts the calculation of the convolution layer 22 in response to the instruction of the calculation instruction unit 13.

なお、時刻t11において、畳み込み層22の予想負荷221が時刻t11における余裕負荷551よりも大きい場合、演算対象選択部12は、時刻t11から所定の時間を経過するまで待機する。演算対象選択部12は、畳み込み層22の予想負荷221を所定の時間を経過した時点における余裕負荷と比較する。 When the expected load 221 of the convolution layer 22 is larger than the margin load 551 at time t11 at time t11, the calculation target selection unit 12 waits until a predetermined time elapses from time t11. The calculation target selection unit 12 compares the expected load 221 of the convolution layer 22 with the margin load at the time when a predetermined time has elapsed.

(時刻t12)
図6を参照して、演算部11が、畳み込み層22の演算を時刻t12に完了する。演算対象選択部12は、時刻t12において、演算対象の中間層を中間層20Aの中から新たに選択する。
(Time t12)
With reference to FIG. 6, the calculation unit 11 completes the calculation of the convolution layer 22 at time t12. At time t12, the calculation target selection unit 12 newly selects the middle layer to be calculated from the intermediate layer 20A.

畳み込み層22の演算が完了したため、演算対象選択部12は、畳み込み層22に接続された畳み込み層23A及び24Aを演算可能な中間層として特定する。畳み込み層23A及び24Aが、演算の完了した畳み込み層22の下流に位置し、かつ、畳み込み層22に直接接続されているためである。 Since the calculation of the convolution layer 22 is completed, the calculation target selection unit 12 specifies the convolution layers 23A and 24A connected to the convolution layer 22 as operable intermediate layers. This is because the convolution layers 23A and 24A are located downstream of the convolution layer 22 for which the calculation has been completed, and are directly connected to the convolution layer 22.

演算対象選択部12は、演算量データ52に記録された畳み込み層23Aの演算量に基づいて、畳み込み層23Aの予想負荷231Aを計算する。演算対象選択部12は、演算量データ52に記録された畳み込み層24Aの演算量に基づいて、畳み込み層24Aの予想負荷241Aを計算する。演算対象選択部12は、計算した予想負荷231A及び241Aの合計を合計予想負荷562として計算する。 The calculation target selection unit 12 calculates the expected load 231A of the convolution layer 23A based on the calculation amount of the convolution layer 23A recorded in the calculation amount data 52. The calculation target selection unit 12 calculates the expected load 241A of the convolution layer 24A based on the calculation amount of the convolution layer 24A recorded in the calculation amount data 52. The calculation target selection unit 12 calculates the total of the calculated expected loads 231A and 241A as the total expected load 562.

なお、図6は、予想負荷231A及び241Aが同じである例を示しているが、予想負荷231A及び241Bは互いに異なっていてもよい。 Although FIG. 6 shows an example in which the expected loads 231A and 241A are the same, the expected loads 231A and 241B may be different from each other.

演算対象選択部12は、時刻t12におけるCPU101の一般負荷55を取得し、取得した一般負荷55に基づいて、時刻t12における余裕負荷552を計算する。 The calculation target selection unit 12 acquires the general load 55 of the CPU 101 at the time t12, and calculates the margin load 552 at the time t12 based on the acquired general load 55.

演算対象選択部12は、計算した合計予想負荷562を時刻t12における余裕負荷532と比較する。図6に示す例では、合計予想負荷562が時刻t12における余裕負荷552よりも大きいため、演算対象選択部12は、畳み込み層23A及び24Aの両者を並行して演算できないと判断する。 The calculation target selection unit 12 compares the calculated total expected load 562 with the margin load 532 at time t12. In the example shown in FIG. 6, since the total expected load 562 is larger than the margin load 552 at time t12, the calculation target selection unit 12 determines that both the convolution layers 23A and 24A cannot be calculated in parallel.

この場合、演算対象選択部12は、予想負荷231A及び241Aの各々を余裕負荷552と比較する。予想負荷231A及び241Aの各々が余裕負荷552以下であるため、演算対象選択部12は、畳み込み層23A及び24Aのいずれか一方を演算対象として選択する。 In this case, the calculation target selection unit 12 compares each of the expected loads 231A and 241A with the margin load 552. Since each of the expected loads 231A and 241A has a margin load of 552 or less, the calculation target selection unit 12 selects either one of the convolution layers 23A and 24A as the calculation target.

具体的には、演算対象選択部12は、畳み込み層23A及び24Aの各々の下流に位置する中間層の数に基づいて、演算対象を選択する。図3に示す例では、畳み込み層24Aの下流に位置する中間層が、畳み込み層23Aの下流に位置する中間層よりも多いため、演算対象選択部12は、畳み込み層24Aを演算対象として選択する。下流の中間層の数が多い畳み込み層24Aの演算を優先することにより、ニューラルネットワーク20の演算終了時刻を早めることができるためである。演算指示部13は、演算対象選択部12により選択された畳み込み層24Aの演算を演算部11に指示する。これにより、畳み込み層24Aの演算が時刻t12から開始される。あるいは、演算対象選択部12は、畳み込み層23A及び24Aのうち、演算量の多い方を選択してもよい。 Specifically, the calculation target selection unit 12 selects a calculation target based on the number of intermediate layers located downstream of each of the convolution layers 23A and 24A. In the example shown in FIG. 3, since the number of intermediate layers located downstream of the convolution layer 24A is larger than that of the intermediate layer located downstream of the convolution layer 23A, the calculation target selection unit 12 selects the convolution layer 24A as the calculation target. .. This is because the calculation end time of the neural network 20 can be advanced by giving priority to the calculation of the convolution layer 24A having a large number of downstream intermediate layers. The calculation instruction unit 13 instructs the calculation unit 11 to perform the calculation of the convolution layer 24A selected by the calculation target selection unit 12. As a result, the calculation of the convolution layer 24A is started from time t12. Alternatively, the calculation target selection unit 12 may select which of the convolution layers 23A and 24A has the larger calculation amount.

つまり、複数の中間層が演算可能であり、かつ、複数の中間層の合計予想負荷が余裕負荷より大きい場合、演算対象選択部12は、これら複数の中間層の優先度に基づいて、演算対象の中間層を選択すればよい。 That is, when a plurality of intermediate layers can be calculated and the total expected load of the plurality of intermediate layers is larger than the margin load, the calculation target selection unit 12 calculates the calculation target based on the priority of the plurality of intermediate layers. The middle layer of is selected.

(時刻t13)
演算部11が、畳み込み層24Aの演算を時刻t13に完了する。演算対象選択部12は、時刻t13において、演算対象の中間層を中間層20Aの中から新たに選択する。
(Time t13)
The calculation unit 11 completes the calculation of the convolution layer 24A at time t13. At time t13, the calculation target selection unit 12 newly selects the calculation target intermediate layer from the intermediate layer 20A.

具体的には、演算対象選択部12は、畳み込み層24Aが終了した時点で演算可能な中間層として、畳み込み層23A及び24Bを特定する。演算対象選択部12は、演算量データ52に記録された畳み込み層23Aの演算量に基づいて、畳み込み層23Aの予想負荷231Aを計算する。演算対象選択部12は、演算量データ52に記録された畳み込み層24Bの演算量に基づいて、畳み込み層24Bの予想負荷241Bを計算する。演算対象選択部12は、計算した予想負荷231Aと予想負荷241Bとの合計を合計予想負荷563として計算する。 Specifically, the calculation target selection unit 12 specifies the convolution layers 23A and 24B as intermediate layers that can be calculated when the convolution layer 24A is completed. The calculation target selection unit 12 calculates the expected load 231A of the convolution layer 23A based on the calculation amount of the convolution layer 23A recorded in the calculation amount data 52. The calculation target selection unit 12 calculates the expected load 241B of the convolution layer 24B based on the calculation amount of the convolution layer 24B recorded in the calculation amount data 52. The calculation target selection unit 12 calculates the total of the calculated expected load 231A and the estimated load 241B as the total expected load 563.

なお、図6は、予想負荷231A及び241Bが同じである例を示しているが、予想負荷231A及び241Bは互いに異なっていてもよい。 Although FIG. 6 shows an example in which the expected loads 231A and 241B are the same, the expected loads 231A and 241B may be different from each other.

演算対象選択部12は、時刻t13におけるCPU101の一般負荷55を取得し、取得した一般負荷55に基づいて、時刻t13における余裕負荷553を計算する。 The calculation target selection unit 12 acquires the general load 55 of the CPU 101 at the time t13, and calculates the margin load 553 at the time t13 based on the acquired general load 55.

演算対象選択部12は、計算した合計予想負荷563を時刻t13における余裕負荷533と比較する。図6に示す例では、合計予想負荷563が時刻t12における余裕負荷533以下である。演算対象選択部12は、畳み込み層23A及び24Bの両者を並行して演算できると判断し、畳み込み層23A及び24Bを演算対象として選択する。 The calculation target selection unit 12 compares the calculated total expected load 563 with the margin load 533 at time t13. In the example shown in FIG. 6, the total expected load 563 is equal to or less than the margin load 533 at time t12. The calculation target selection unit 12 determines that both the convolution layers 23A and 24B can be calculated in parallel, and selects the convolution layers 23A and 24B as calculation targets.

演算指示部13は、演算対象選択部12により選択された畳み込み層23A及び24Aの演算を演算部11に指示する。これにより、畳み込み層23A及び24Bの演算が時刻t13から開始される。 The calculation instruction unit 13 instructs the calculation unit 11 to calculate the convolution layers 23A and 24A selected by the calculation target selection unit 12. As a result, the operations of the convolution layers 23A and 24B are started at time t13.

(時刻t14以降)
時刻t14において、畳み込み層23A及び24Bの両者の演算が完了する。その後、情報処理装置1は、上記と同様の処理を実行することにより、時刻t14においてプーリング層23Bを演算対象として選択し、時刻t15においてプーリング層24Bを選択する。時刻t14及びt15における演算対象の選択の詳細な説明を省略する。
(After time t14)
At time t14, the operations of both the convolution layers 23A and 24B are completed. After that, the information processing apparatus 1 selects the pooling layer 23B as the calculation target at the time t14 and selects the pooling layer 24B at the time t15 by executing the same processing as described above. A detailed description of the selection of the calculation target at the times t14 and t15 will be omitted.

時刻t15において、プーリング層23Bの演算が完了している。しかし、演算対象選択部12は、全結合層25を演算可能な中間層として特定することができない。全結合層25と依存関係にあるプーリング層23B及び24Cの両者の演算が完了していないためである。 At time t15, the calculation of the pooling layer 23B is completed. However, the calculation target selection unit 12 cannot specify the fully connected layer 25 as an intermediate layer that can be calculated. This is because the operations of both the pooling layers 23B and 24C, which are dependent on the fully connected layer 25, have not been completed.

従って、情報処理装置1は、時刻t15において、プーリング層23Bの予想負荷231Bが時刻t15にける予想負荷以下であることを条件として、プーリング層24Cの演算を開始する。 Therefore, the information processing apparatus 1 starts the calculation of the pooling layer 24C on condition that the expected load 231B of the pooling layer 23B is equal to or less than the expected load at the time t15 at the time t15.

情報処理装置1は、全結合層26の演算を終了した場合、出力層27の演算を開始する。情報処理装置1は、出力層27の予想負荷を全結合層26の演算完了時における予想負荷と比較し、その比較結果に基づいて出力層27の演算を開始するか否かを判断してもよい。 When the information processing device 1 finishes the calculation of the fully connected layer 26, the information processing device 1 starts the calculation of the output layer 27. Even if the information processing device 1 compares the expected load of the output layer 27 with the expected load at the completion of the calculation of the fully coupled layer 26, and determines whether or not to start the calculation of the output layer 27 based on the comparison result. Good.

(フローチャート)
図7は、図1に示す情報処理装置1の動作を示すフローチャートである。図7を参照して、情報処理装置1は、前方画像61が入力層21に入力された場合、又は、演算対象選択部12により選択された中間層の演算が完了した場合に、図7に示す処理を開始する。
(flowchart)
FIG. 7 is a flowchart showing the operation of the information processing apparatus 1 shown in FIG. With reference to FIG. 7, the information processing apparatus 1 shows that when the front image 61 is input to the input layer 21, or when the calculation of the intermediate layer selected by the calculation target selection unit 12 is completed, FIG. 7 shows. The processing shown is started.

演算対象選択部12は、図7に示す処理を開始した時点における一般負荷55を取得する(ステップS11)。演算対象選択部12は、ステップS11で取得した一般負荷55と、予め設定された上限負荷とに基づいて、余裕負荷を算出する(ステップS12)。 The calculation target selection unit 12 acquires the general load 55 at the time when the process shown in FIG. 7 is started (step S11). The calculation target selection unit 12 calculates the margin load based on the general load 55 acquired in step S11 and the preset upper limit load (step S12).

演算対象選択部12は、ニューラルネットワーク20の構造に基づいて、中間層20Aのうち演算可能な中間層を特定する(ステップS13)。具体的には、一の中間層の演算が完了した場合、演算対象選択部12は、一の中間層の下流に接続された中間層を演算可能と判断する。前方画像61が入力層21に入力された場合、演算対象選択部12は、入力層21に接続された畳み込み層22を演算可能と判断する。 The calculation target selection unit 12 specifies an intermediate layer that can be calculated among the intermediate layers 20A based on the structure of the neural network 20 (step S13). Specifically, when the calculation of one intermediate layer is completed, the calculation target selection unit 12 determines that the intermediate layer connected to the downstream of the one intermediate layer can be calculated. When the front image 61 is input to the input layer 21, the calculation target selection unit 12 determines that the convolution layer 22 connected to the input layer 21 can be calculated.

演算対象選択部12は、ステップS13で特定した中間層の予想負荷を計算する(ステップS14)。ステップS14の後に、演算対象選択部12は、ステップS13で特定した中間層の数が2以上であるか否かを判断する(ステップS15)。 The calculation target selection unit 12 calculates the expected load of the intermediate layer specified in step S13 (step S14). After step S14, the calculation target selection unit 12 determines whether or not the number of intermediate layers specified in step S13 is 2 or more (step S15).

ステップS13で特定した中間層の数が1である場合(ステップS15においてNo)、演算対象選択部12は、ステップS14で計算した予想負荷をステップS12で計算した余裕負荷と比較する(ステップS20)。 When the number of intermediate layers specified in step S13 is 1 (No in step S15), the calculation target selection unit 12 compares the expected load calculated in step S14 with the margin load calculated in step S12 (step S20). ..

予想負荷が余裕負荷以下である場合(ステップS20においてYes)、演算対象選択部12は、ステップS13で特定した中間層を演算対象に選択する(ステップS18)。予想負荷が余裕負荷より大きい場合(ステップS20においてNo)、演算対象選択部12は、所定時間が経過するまで待機し(ステップS21)、ステップS11に戻る。 When the expected load is equal to or less than the margin load (Yes in step S20), the calculation target selection unit 12 selects the intermediate layer specified in step S13 as the calculation target (step S18). When the expected load is larger than the margin load (No in step S20), the calculation target selection unit 12 waits until a predetermined time elapses (step S21), and returns to step S11.

ステップS15の説明に戻る。ステップS13で特定した中間層の数が2以上である場合(ステップS15においてYes)、演算対象選択部12は、ステップS14で計算した予想負荷の合計を合計予想負荷として計算する(ステップS16)。演算対象選択部12は、ステップS16で計算した合計予想負荷をステップS12で計算した余裕負荷と比較する(ステップS17)。 Returning to the description of step S15. When the number of intermediate layers specified in step S13 is 2 or more (Yes in step S15), the calculation target selection unit 12 calculates the total of the expected loads calculated in step S14 as the total expected load (step S16). The calculation target selection unit 12 compares the total expected load calculated in step S16 with the margin load calculated in step S12 (step S17).

合計予想負荷が余裕負荷以下である場合(ステップS17においてYes)、演算対象選択部12は、ステップS13で特定された全中間層を演算対象として選択する(ステップS18)。合計予想負荷が余裕負荷よりも大きい場合(ステップS17においてNo)、演算対象選択部12は、ステップS12で特定された中間層の各々の優先度に基づいて、演算対象の中間層を選択する(ステップS19)。 When the total expected load is equal to or less than the margin load (Yes in step S17), the calculation target selection unit 12 selects all the intermediate layers specified in step S13 as calculation targets (step S18). When the total expected load is larger than the margin load (No in step S17), the calculation target selection unit 12 selects the calculation target intermediate layer based on the priority of each of the intermediate layers specified in step S12 (No). Step S19).

以上説明したように、本実施の形態に係る情報処理装置1は、ニューラルネットワーク20の構造と、中間層20Aの各々の演算量と、演算部11の負荷とに基づいて、演算対象の中間層を選択する。これにより、情報処理装置1は、演算処理能力の高いCPUを備えなくても、ニューラルネットワークを用いた処理と、その他の処理とを並行して実行することが可能となる。 As described above, the information processing apparatus 1 according to the present embodiment is based on the structure of the neural network 20, the amount of each calculation of the intermediate layer 20A, and the load of the calculation unit 11, and is the intermediate layer to be calculated. Select. As a result, the information processing apparatus 1 can execute the processing using the neural network and the other processing in parallel without having to provide a CPU having a high arithmetic processing capacity.

また、情報処理装置1は、演算可能な複数の中間層を特定した場合、複数の中間層の各々の予想負荷を取得し、取得した予想負荷と一般負荷55との合計が余裕負荷を超えるか否かを判断する。取得した予想負荷と一般負荷55との合計が余裕負荷を超えない場合、情報処理装置1は、特定した複数の中間層を演算対象として選択する。これにより、情報処理装置1は、複数の中間層の演算をその他の処理と並行して実行できるため、ニューラルネットワークの演算完了を早めることができる。 Further, when the information processing apparatus 1 specifies a plurality of intermediate layers that can be calculated, the information processing apparatus 1 acquires the expected load of each of the plurality of intermediate layers, and does the sum of the acquired expected load and the general load 55 exceed the margin load? Judge whether or not. When the sum of the acquired expected load and the general load 55 does not exceed the margin load, the information processing apparatus 1 selects the specified plurality of intermediate layers as calculation targets. As a result, the information processing apparatus 1 can execute the operations of the plurality of intermediate layers in parallel with the other processes, so that the calculation completion of the neural network can be accelerated.

[第2の実施の形態]
[1.構成]
[1.1.情報処理装置1Aの構成]
図8は、本発明の第2の実施の形態に係る情報処理システム100Aの構成を示す機能ブロック図である。図8を参照して、情報処理システム100Aは、情報処理装置1に代えて、情報処理装置1Aを備える。情報処理装置1Aは、歩行者だけでなく交通標識を前方画像61から検出する。
[Second Embodiment]
[1. Constitution]
[1.1. Configuration of information processing device 1A]
FIG. 8 is a functional block diagram showing the configuration of the information processing system 100A according to the second embodiment of the present invention. With reference to FIG. 8, the information processing system 100A includes an information processing device 1A instead of the information processing device 1. The information processing device 1A detects not only pedestrians but also traffic signs from the front image 61.

情報処理装置1Aは、演算部11及び演算対象選択部12に代えて、演算部11A及び演算対象選択部12Aを備える。演算部11Aは、記憶装置2に記憶されたニューラルネットワーク20及び30の演算を行う。演算対象選択部12Aは、ニューラルネットワーク20及び30の中間層の中から演算対象の中間層を選択する。 The information processing device 1A includes a calculation unit 11A and a calculation target selection unit 12A in place of the calculation unit 11 and the calculation target selection unit 12. The calculation unit 11A performs calculations on the neural networks 20 and 30 stored in the storage device 2. The calculation target selection unit 12A selects the calculation target intermediate layer from the intermediate layers of the neural networks 20 and 30.

記憶装置2は、ニューラルネットワーク30及び演算量データ53をさらに記憶する。ニューラルネットワーク30は、交通標識を前方画像61から検出するために用いられる。演算量データ53は、ニューラルネットワーク30に含まれる中間層の各々の演算量を記録する。 The storage device 2 further stores the neural network 30 and the calculation amount data 53. The neural network 30 is used to detect traffic signs from the forward image 61. The calculation amount data 53 records the calculation amount of each of the intermediate layers included in the neural network 30.

以下、上記実施の形態と異なる点を中心に本実施の形態を説明する。上記実施の形態と本実施の形態とにおいて共通する構成及び動作については、その説明を省略する。 Hereinafter, the present embodiment will be described with a focus on points different from the above-described embodiment. The description of the configuration and operation common to the above-described embodiment and the present embodiment will be omitted.

[1.2.ニューラルネットワーク30の構成]
図9は、図8に示すニューラルネットワーク30の構成を示す概略図である。図9を参照して、ニューラルネットワーク30は、入力層31と、畳み込み層32及び33と、プーリング層34と、全結合層35及び36と、出力層37とを備える。図9に示すニューラルネットワーク30において、ノードの表示を省略している。
[1.2. Configuration of neural network 30]
FIG. 9 is a schematic view showing the configuration of the neural network 30 shown in FIG. With reference to FIG. 9, the neural network 30 includes an input layer 31, convolution layers 32 and 33, a pooling layer 34, fully coupled layers 35 and 36, and an output layer 37. In the neural network 30 shown in FIG. 9, the display of nodes is omitted.

以下の説明において、畳み込み層32及び33と、プーリング層34と、全結合層35及び36とを総称して、「中間層30A」と記載する場合がある。 In the following description, the convolutional layers 32 and 33, the pooling layer 34, and the fully connected layers 35 and 36 may be collectively referred to as "intermediate layer 30A".

入力層31は、前処理された前方画像61の画素データを受け、その受けた前方画像61の画素データを畳み込み層32に供給する。 The input layer 31 receives the pixel data of the preprocessed front image 61, and supplies the received pixel data of the front image 61 to the convolution layer 32.

畳み込み層32は、入力層31から受けた画素データを畳み込み演算し、畳み込み演算の結果を畳み込み層33に供給する。畳み込み層33は、畳み込み層32から受けた畳み込み演算の結果を、さらに畳み込み演算する。畳み込み層33は、畳み込み演算の結果をプーリング層34に供給する。 The convolution layer 32 performs a convolution calculation on the pixel data received from the input layer 31, and supplies the result of the convolution calculation to the convolution layer 33. The convolution layer 33 further performs a convolution calculation based on the result of the convolution calculation received from the convolution layer 32. The convolution layer 33 supplies the result of the convolution operation to the pooling layer 34.

プーリング層34は、畳み込み層33から受けた畳み込み演算の結果を統計的に処理し、その統計処理結果を全結合層35に供給する。 The pooling layer 34 statistically processes the result of the convolution operation received from the convolution layer 33, and supplies the statistical processing result to the fully connected layer 35.

全結合層35は、プーリング層34から統計処理結果を受け、その受けた統計処理結果を用いた演算を行う。全結合層35は、演算結果を全結合層36に供給する。全結合層36は、全結合層35から受けた演算結果をさらに演算し、その演算結果を出力層37に供給する。 The fully connected layer 35 receives a statistical processing result from the pooling layer 34, and performs an operation using the received statistical processing result. The fully connected layer 35 supplies the calculation result to the fully connected layer 36. The fully connected layer 36 further calculates the calculation result received from the fully connected layer 35, and supplies the calculation result to the output layer 37.

出力層37は、結合層36から受けた演算結果に基づいて、前方画像61から検出された交通標識を示す標識検出結果38を出力する。標識検出結果38は、結果データ62の生成に用いられる。 The output layer 37 outputs a sign detection result 38 indicating a traffic sign detected from the front image 61 based on the calculation result received from the coupling layer 36. The label detection result 38 is used to generate the result data 62.

[2.動作]
情報処理装置1Aは、前方画像61の前処理が終了した場合、ニューラルネットワーク20及び30を用いて、歩行者及び交通標識を前処理された前方画像61から検出する。
[2. motion]
When the preprocessing of the front image 61 is completed, the information processing device 1A detects pedestrians and traffic signs from the preprocessed front image 61 by using the neural networks 20 and 30.

図10は、図8に示す情報処理装置1Aに搭載されたCPU101の一般負荷57の時間変化の一例を示すグラフである。一般負荷57は、ニューラルネットワーク20及び30の演算に伴う負荷を除いたCPU101の負荷に相当する。 FIG. 10 is a graph showing an example of a time change of the general load 57 of the CPU 101 mounted on the information processing apparatus 1A shown in FIG. The general load 57 corresponds to the load of the CPU 101 excluding the load associated with the operations of the neural networks 20 and 30.

(時刻t21)
図10を参照して、前方画像61の前処理が時刻t21において完了する。演算対象選択部12Aは、ニューラルネットワーク20及び30において演算可能な中間層として、畳み込み層22及び32を特定する。ニューラルネットワーク20及び30は、互いに独立しているためである。
(Time t21)
With reference to FIG. 10, the preprocessing of the front image 61 is completed at time t21. The calculation target selection unit 12A specifies the convolution layers 22 and 32 as intermediate layers that can be calculated in the neural networks 20 and 30. This is because the neural networks 20 and 30 are independent of each other.

演算対象選択部12Aは、畳み込み層22の予想負荷221と畳み込み層32の予想負荷321とを計算する。予想負荷321は、演算量データ53に記録された畳み込み層32の演算量に基づいて計算される。演算対象選択部12Aは、計算した予想負荷221及び321の合計を予想合計負荷621として計算する。 The calculation target selection unit 12A calculates the expected load 221 of the convolution layer 22 and the expected load 321 of the convolution layer 32. The expected load 321 is calculated based on the calculated amount of the convolution layer 32 recorded in the calculated amount data 53. The calculation target selection unit 12A calculates the sum of the calculated expected loads 221 and 321 as the expected total load 621.

演算対象選択部12Aは、時刻t22における一般負荷57を取得し、取得した一般負荷57と負荷上限とに基づいて余裕負荷571を計算する。 The calculation target selection unit 12A acquires the general load 57 at time t22, and calculates the margin load 571 based on the acquired general load 57 and the load upper limit.

演算対象選択部12Aは、予想合計負荷621が余裕負荷571以下であるため、畳み込み層22及び32の両者を演算対象として選択する。演算指示部13は、演算対象選択部12Aにより選択された畳み込み層22及び32の演算を演算部11に指示する。これにより、畳み込み層22及び32の演算が、時刻t22から開始される。 Since the expected total load 621 is equal to or less than the margin load 571, the calculation target selection unit 12A selects both the convolution layers 22 and 32 as calculation targets. The calculation instruction unit 13 instructs the calculation unit 11 to perform calculations on the convolution layers 22 and 32 selected by the calculation target selection unit 12A. As a result, the operations of the convolution layers 22 and 32 are started at time t22.

(時刻t22)
時刻t22において、畳み込み層22及び32の演算が完了する。畳み込み層23A及び24Aは、畳み込み層22の下流に位置し、かつ、畳み込み層22に接続する。畳み込み層33は、畳み込み層32の下流に位置し、かつ、畳み込み層32に接続する。従って、演算対象選択部12Aは、演算可能な中間層として、畳み込み層23A、24A及び33を選択する。
(Time t22)
At time t22, the operations of the convolution layers 22 and 32 are completed. The convolution layers 23A and 24A are located downstream of the convolution layer 22 and are connected to the convolution layer 22. The convolution layer 33 is located downstream of the convolution layer 32 and is connected to the convolution layer 32. Therefore, the calculation target selection unit 12A selects the convolution layers 23A, 24A, and 33 as the intermediate layers that can be calculated.

演算対象選択部12Aは、畳み込み層23Aの予想負荷231Aと、畳み込み層24Aの予想負荷241Aと、畳み込み層33の予想負荷331とを計算する。演算対象選択部12Aは、計算した予想負荷231A、241A及び331Aの合計を合計予想負荷622として計算する。 The calculation target selection unit 12A calculates the expected load 231A of the convolution layer 23A, the expected load 241A of the convolution layer 24A, and the expected load 331 of the convolution layer 33. The calculation target selection unit 12A calculates the total of the calculated expected loads 231A, 241A, and 331A as the total expected load 622.

演算対象選択部12Aは、上限負荷と時刻t22における一般負荷57とに基づいて、時刻t22における余裕負荷572を計算する。 The calculation target selection unit 12A calculates the margin load 572 at the time t22 based on the upper limit load and the general load 57 at the time t22.

合計予想負荷622が余裕負荷572よりも大きいため、演算対象選択部12Aは、時刻t22において特定した3つの中間層のうち、下流の中間層の数が最も多い畳み込み層24Aの予想負荷241Aを余裕負荷572と比較する。予想負荷241Aが余裕負荷572よりも小さいため、演算対象選択部12Aは、畳み込み層24Aを演算対象として選択する。演算指示部13は、演算対象選択部12Aにより選択された畳み込み層24Aの演算を演算部11Aに指示する。これにより、畳み込み層24Aの演算が、時刻t22から開始される。 Since the total expected load 622 is larger than the margin load 572, the calculation target selection unit 12A has a margin of the expected load 241A of the convolution layer 24A having the largest number of downstream intermediate layers among the three intermediate layers specified at time t22. Compare with load 572. Since the expected load 241A is smaller than the margin load 572, the calculation target selection unit 12A selects the convolution layer 24A as the calculation target. The calculation instruction unit 13 instructs the calculation unit 11A to perform the calculation of the convolution layer 24A selected by the calculation target selection unit 12A. As a result, the calculation of the convolution layer 24A starts at time t22.

あるいは、演算対象選択部12Aは、時刻t22において特定した3つの中間層のうち2つの中間層の予想効果の合計を計算し、計算した合計を余裕負荷572と比較してもよい。計算した合計が余裕負荷572よりも小さい場合、これら2つの中間層を演算対象として選択する。演算対象として選択できる2つの中間層の組み合わせが複数存在する場合には、演算対象選択部12Aは、2つの中間層の演算量の合計が最も大きいか、又は、2つの中間層の下流に位置する層の合計の最も多い組み合わせを選択すればよい。 Alternatively, the calculation target selection unit 12A may calculate the total of the expected effects of two of the three intermediate layers specified at time t22, and compare the calculated total with the margin load 572. When the calculated total is smaller than the margin load 572, these two intermediate layers are selected as calculation targets. When there are a plurality of combinations of two intermediate layers that can be selected as calculation targets, the calculation target selection unit 12A has the largest total calculation amount of the two intermediate layers, or is located downstream of the two intermediate layers. The combination with the largest total number of layers to be used may be selected.

(時刻t22以後)
時刻t22以降においても、演算対象選択部12Aは、中間層の演算が完了するたびに、演算可能な中間層をニューラルネットワーク20及び30の各々から特定し、特定した中間層の予想負荷と余裕負荷とに基づいて、演算対象の中間層を選択する。
(After time t22)
Even after the time t22, the calculation target selection unit 12A identifies the calculationable intermediate layer from each of the neural networks 20 and 30 each time the calculation of the intermediate layer is completed, and the expected load and the margin load of the specified intermediate layer. Based on and, the intermediate layer to be calculated is selected.

以上説明したように、情報処理装置1Aは、ニューラルネットワーク20及び30の各々から演算可能な中間層を特定し、特定した中間層の各々の予想負荷を取得する。情報処理装置1Aは、取得した予想負荷と一般負荷57との合計が余裕負荷を超えるか否かを判断する。取得した予想負荷と一般負荷57との合計が余裕負荷を超えない場合、情報処理装置1は、特定した全ての中間層を演算対象として選択する。これにより、情報処理装置1は、複数のニューラルネットワークの演算とその他の処理と並行して実行することができる。 As described above, the information processing apparatus 1A identifies an intermediate layer that can be calculated from each of the neural networks 20 and 30, and acquires the expected load of each of the specified intermediate layers. The information processing apparatus 1A determines whether or not the sum of the acquired expected load and the general load 57 exceeds the margin load. When the sum of the acquired expected load and the general load 57 does not exceed the margin load, the information processing apparatus 1 selects all the specified intermediate layers as calculation targets. As a result, the information processing apparatus 1 can execute the operations of the plurality of neural networks and other processes in parallel.

[変形例]
(ニューラルネットワークとブロック線図との相互変換)
図11は、ニューラルネットワークをブロック線図に変換する一例を示す図である。ニューラルネットワークは重み付き有向グラフである。一般的なブロック線図において、ブロックの値の重みとして捉えた場合、一般的なブロック線図は、重み付き有向グラフと考えることができる。つまり、図11に示すように、ニューラルネットワークをブロック線図に変換することができる。
[Modification example]
(Mutual conversion between neural network and block diagram)
FIG. 11 is a diagram showing an example of converting a neural network into a block diagram. Neural networks are weighted directed graphs. In a general block diagram, when it is regarded as a weight of a block value, the general block diagram can be considered as a weighted directed graph. That is, as shown in FIG. 11, the neural network can be converted into a block diagram.

図11に示す変換において、情報の喪失が発生しないため、ニューラルネットワークからブロック線図への変換は可逆である。つまり、ブロック線図からニューラルネットワークに変換することが可能である。 In the transformation shown in FIG. 11, since no information is lost, the conversion from the neural network to the block diagram is reversible. That is, it is possible to convert the block diagram into a neural network.

図12は、ニューラルネットワークの一例を示す図である。図13は、図12に示すニューラルネットワークを隣接行列として表した図である。図12を参照して、xは入力ノードであり、yは中間ノードであり、zは出力ノードである。wは重みであり、bは、バイアスである。cは、値として1を有する定数である。図12に示すニューラルネットワークを重み付き有向グラフとして捉えた場合、図12に示すニューラルネットワークを図13に示す隣接行列として表現することができる。 FIG. 12 is a diagram showing an example of a neural network. FIG. 13 is a diagram showing the neural network shown in FIG. 12 as an adjacency matrix. With reference to FIG. 12, x is an input node, y is an intermediate node, and z is an output node. w is the weight and b is the bias. c is a constant having 1 as a value. When the neural network shown in FIG. 12 is regarded as a weighted directed graph, the neural network shown in FIG. 12 can be expressed as an adjacency matrix shown in FIG.

図13に示す隣接行列から重み付き有向グラフの行列式を作成する場合、行列式は、下記の式(2)及び(3)により表される。 When creating a determinant of a weighted directed graph from the adjacency matrix shown in FIG. 13, the determinant is represented by the following equations (2) and (3).

Figure 2021099596
Figure 2021099596

Figure 2021099596
Figure 2021099596

式(1)及び(2)における、x、y、z、w及びbをそれぞれX、Y、Z、W及びBのようにベクトルで表現し、c=1を代入する。その結果、式(1)及び(2)を、式(3)及び(4)のように変形することができる。 In equations (1) and (2), x, y, z, w and b are represented by vectors such as X, Y, Z, W and B, respectively, and c = 1 is substituted. As a result, the equations (1) and (2) can be modified as the equations (3) and (4).

Figure 2021099596
Figure 2021099596

Figure 2021099596
Figure 2021099596

図14は、図12に示すニューラルネットワークを変換したブロック線図である。図14は、式(3)及び(4)をブロック線図で表現した図に相当する。 FIG. 14 is a block diagram obtained by converting the neural network shown in FIG. FIG. 14 corresponds to a diagram in which the equations (3) and (4) are represented by a block diagram.

ブロック線図は、階層化によって制御構造を抽象化する機能を有する。通常、制御設計者は、ニューラルネットワーク等のAI(artificial intelligence)モデルの内部構造に関心を持たない。従って、AIモデルを複雑な機能を持つブロックとして扱うことにより、ニューラルネットワークを隠蔽することができる。AI開発者は、隠蔽されたニューラルネットワークだけに注目すれば、制御と関係なく開発を進めることができる。 The block diagram has a function of abstracting the control structure by layering. Normally, control designers are not interested in the internal structure of AI (artificial intelligence) models such as neural networks. Therefore, the neural network can be hidden by treating the AI model as a block having a complicated function. AI developers can proceed with development independently of control by focusing only on hidden neural networks.

さらに、ニューラルネットワークの構造を入力層、畳み込み層等の階層で抽象化することにより、さらにその下の階層を平易な数値演算の組み合わせに単純化することができる。下の階層は、マイクロコンピュータの実装技術者が並列化やメモリ配置などを工夫して高速化するために利用される。このことから、ニューラルネットワークをブロック線図に変換することは、車載用のマイクロコンピュータの実装のためだけでなく、開発プロセスを役割ごとに分離し、品質及び性能の保証範囲を明確にする効果も期待できる。 Furthermore, by abstracting the structure of the neural network with layers such as an input layer and a convolution layer, the layers below it can be simplified into a combination of simple numerical operations. The lower layer is used by microprocessor mounting engineers to devise parallelization and memory allocation to increase speed. From this, converting a neural network into a block diagram has the effect of separating the development process by role and clarifying the guarantee range of quality and performance, not only for the implementation of an in-vehicle microcomputer. You can expect it.

(並列化の対象の選定)
GPU(Graphics Processing Unit)サーバを用いて設計及び学習したニューラルネットワークが、構造的にそれ以上演算を削減できないと仮定する。この場合、ニューラルネットワークをマイクロコンピュータに実装する時の課題を、如何にしてCPI(Clocks Per Instruction)を改善するかに絞り込むことができる。レイテンシの小さな命令やメモリアクセス等の様々な方法がCPIの改善手法として知られている。しかし、CPIの改善に最も寄与するのは並列化である。そのため、ライブラリ開発に際しては、演算の依存関係をどこまでなくせるかを検討する必要がある。
(Selection of parallelization target)
It is assumed that the neural network designed and learned using the GPU (Graphics Processing Unit) server cannot structurally reduce the number of operations any more. In this case, the problem when implementing the neural network in the microcomputer can be narrowed down to how to improve the CPI (Clocks Per Instruction). Various methods such as low-latency instructions and memory access are known as methods for improving CPI. However, it is parallelization that contributes most to the improvement of CPI. Therefore, when developing a library, it is necessary to consider how much the operation dependency can be eliminated.

演算のどの部分に依存関係があるかは、コードを生成する前のブロック線図の構造を有向グラフとみなすことにより明確に分かる。ニューラルネットワークをブロック線図に変換することで、グラフィカルに並列化を検討することができる。 Which part of the operation has the dependency can be clearly understood by considering the structure of the block diagram before generating the code as a directed graph. By converting the neural network into a block diagram, parallelization can be examined graphically.

図15は、ニューラルネットワークを変換したブロック線図の他の例である。図15に示すブロック線図において、矢印でつながるブロック同士は明確に依存関係があるため、分岐ごとに並列化の対象を選定する。 FIG. 15 is another example of a block diagram obtained by transforming a neural network. In the block diagram shown in FIG. 15, since the blocks connected by the arrows have a clear dependency relationship, the target of parallelization is selected for each branch.

図15において、横方向が時間、縦方向が並列数を示している。このため、図15に示すブロック線図は、現時点における最大並列数、かつ、最短時間の処理を示している。ターゲットの並列数が十分であれば、図15に示すブロック線図の構成のまま実装できる。ターゲットの並列数が十分でない場合、割り当てを検討する必要がある。そこで、分割した領域を有向グラフとして出力ノードから順に割り当てる。この結果、図15に示すブロック線図が、図16に示すようにグラフ化される。 In FIG. 15, the horizontal direction shows the time and the vertical direction shows the number of parallels. Therefore, the block diagram shown in FIG. 15 shows the processing with the maximum number of parallels and the shortest time at the present time. If the number of parallel targets is sufficient, the block diagram shown in FIG. 15 can be implemented as it is. If the number of parallel targets is not enough, you should consider the allocation. Therefore, the divided areas are assigned in order from the output node as a directed graph. As a result, the block diagram shown in FIG. 15 is graphed as shown in FIG.

図17は、図16に示された処理依存関係に基づく並列処理の割り当ての手順を示す図である。デュアルコアCPUを開発ターゲットとした場合、並列数は2である。分かり易くするために、図16に示すa〜kの全ての処理が、同様の処理時間であると仮定する。この場合、並列数×時系列の箱を用意してなるべく時系列が短くなるように処理を並べればよい。そのアルゴリズムは、以下の通りである。 FIG. 17 is a diagram showing a procedure of allocating parallel processing based on the processing dependency shown in FIG. When a dual-core CPU is the development target, the number of parallels is 2. For the sake of clarity, it is assumed that all the processes a to k shown in FIG. 16 have the same processing time. In this case, a box of the number of parallels × time series may be prepared and the processes may be arranged so that the time series is as short as possible. The algorithm is as follows.

手順1:各ノードが直接参照する他ノードの1つ手前となるように時系列方向に整理する。
手順2:各ノードを参照する全てのノード数である「被依存度」を求める。
手順3:非依存度の大きいノードから、空いている箱のうち、最も右に配置する。ただし、手順1で整理した位置よりも左に位置するように当該ノードを配置する。
Step 1: Arrange in the time series so that each node is one before the other nodes that are directly referenced.
Step 2: Find the "dependency", which is the total number of nodes that refer to each node.
Step 3: Place the empty box on the far right from the node with the highest dependency. However, the node is arranged so as to be located to the left of the position arranged in step 1.

(その他の変形例)
上記実施の形態において、情報処理装置1は、ニューラルネットワーク20を互いに異なるプロセスID(IDentification)で実行してもよい。例えば、時刻t(k)に生成された前方画像61から歩行者を検出する画像認識処理と、時刻t(k+1)に生成された前方画像61から歩行者を検出する画像認識処理とは、互いに独立している。時刻t(k+1)は、時刻t(k)よりも後の時刻である。
(Other variants)
In the above embodiment, the information processing apparatus 1 may execute the neural network 20 with different process IDs (IDentification). For example, the image recognition process for detecting a pedestrian from the front image 61 generated at time t (k) and the image recognition process for detecting a pedestrian from the front image 61 generated at time t (k + 1) are mutually exclusive. being independent. The time t (k + 1) is a time after the time t (k).

この場合、演算対象選択部12は、時刻t(k)に対応する画像認識処理と、時刻t(k+1)に対応する画像認識処理とに対して異なるプロセスIDを割り当てる。この場合、演算対象選択部12は、時刻t(k)に対応する画像認識処理で用いられるニューラルネットワーク20と、時刻t(k+1)に対応する画像認識処理で用いられるニューラルネットワーク20との各々から演算可能な中間層を特定すればよい。演算可能な中間層を特定した後における演算対象選択部12の動作は、上記と同様である。 In this case, the calculation target selection unit 12 assigns different process IDs to the image recognition process corresponding to the time t (k) and the image recognition process corresponding to the time t (k + 1). In this case, the calculation target selection unit 12 is derived from each of the neural network 20 used in the image recognition process corresponding to the time t (k) and the neural network 20 used in the image recognition process corresponding to the time t (k + 1). It suffices to specify the intermediate layer that can be calculated. The operation of the calculation target selection unit 12 after specifying the calculation target intermediate layer is the same as described above.

上記実施の形態において、演算対象選択部12が、演算可能な中間層の予想負荷を余裕負荷と比較する例を説明したが、これに限られない。演算対象選択部12及び12Aは、ニューラルネットワークの構造と、中間層の演算量と、演算部11及び11Aの負荷とに基づいて、演算対象の中間層を特定できれば、演算対象の中間層を選択する手順は、特に限定されない。 In the above embodiment, an example in which the calculation target selection unit 12 compares the expected load of the intermediate layer that can be calculated with the margin load has been described, but the present invention is not limited to this. The calculation target selection units 12 and 12A select the calculation target intermediate layer if the calculation target intermediate layer can be specified based on the structure of the neural network, the calculation amount of the intermediate layer, and the load of the calculation units 11 and 11A. The procedure to be performed is not particularly limited.

上記実施の形態における処理方法の実行順序は、上記実施の形態の記載に制限されるものではなく、発明の要旨を逸脱しない範囲で実行順序を入れ替えてもよい。 The execution order of the processing methods in the above-described embodiment is not limited to the description of the above-described embodiment, and the execution order may be changed without departing from the gist of the invention.

前述した方法をコンピュータに実行させるコンピュータプログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体は、本発明の範囲に含まれる。ここで、コンピュータ読み取り可能な記録媒体としては、例えば、フレキシブルディスク、ハードディスク、CD−ROM、MO、DVD、DVD−ROM、DVD−RAM、大容量DVD、次世代DVD、半導体メモリを挙げることができる。 A computer program that causes a computer to perform the above-mentioned method and a computer-readable recording medium on which the program is recorded are included in the scope of the present invention. Here, examples of computer-readable recording media include flexible disks, hard disks, CD-ROMs, MOs, DVDs, DVD-ROMs, DVD-RAMs, large-capacity DVDs, next-generation DVDs, and semiconductor memories. ..

以上、本発明の実施の形態を説明したが、上述した実施の形態は本発明を実施するための例示に過ぎない。よって、本発明は上述した実施の形態に限定されることなく、その趣旨を逸脱しない範囲内で上述した実施の形態を適宜変形して実施することが可能である。 Although the embodiments of the present invention have been described above, the above-described embodiments are merely examples for carrying out the present invention. Therefore, the present invention is not limited to the above-described embodiment, and the above-described embodiment can be appropriately modified and implemented within a range that does not deviate from the gist thereof.

100,100A 情報処理システム
1,1A 情報処理装置
11,11A 演算部
12,12A 演算対象選択部
13 演算指示部
21,31 入力層
22,23A,24A,24B,32,33 畳み込み層
23B,24C,34 プーリング層
25,26,35,36 全結合層
27,37 出力層
100,100A Information processing system 1,1A Information processing device 11, 11A Calculation unit 12, 12A Calculation target selection unit 13 Calculation instruction unit 21, 31 Input layer 22, 23A, 24A, 24B, 32, 33 Folding layer 23B, 24C, 34 Pooling layer 25,26,35,36 Fully connected layer 27,37 Output layer

Claims (5)

複数の中間層を含むニューラルネットワークの演算と、前記ニューラルネットワークと異なる所定のプログラムの演算とを実行する演算部と、
前記ニューラルネットワークの構造と、前記複数の中間層の各々における演算量を示す演算量データと、前記演算部の負荷とに基づいて、前記複数の中間層のうち演算すべき中間層を選択する演算対象選択部と、
前記演算対象選択部により選択された中間層の演算を前記演算部に指示する演算指示部と、を備える情報処理装置。
An arithmetic unit that executes an operation of a neural network including a plurality of intermediate layers and an operation of a predetermined program different from the neural network.
Calculation to select an intermediate layer to be calculated from the plurality of intermediate layers based on the structure of the neural network, the calculation amount data indicating the calculation amount in each of the plurality of intermediate layers, and the load of the calculation unit. Target selection section and
An information processing device including a calculation instruction unit that instructs the calculation unit to perform an operation on an intermediate layer selected by the calculation target selection unit.
請求項1に記載の情報処理装置であって、
前記演算対象選択部は、前記ニューラルネットワークの演算により発生する前記演算部の負荷と、前記所定のプログラムの演算により発生する前記演算部の負荷との合計が、予め設定された前記演算部の負荷の上限を超えないように、前記演算すべき中間層を選択する、情報処理装置。
The information processing device according to claim 1.
In the calculation target selection unit, the sum of the load of the calculation unit generated by the calculation of the neural network and the load of the calculation unit generated by the calculation of the predetermined program is set in advance as the load of the calculation unit. An information processing device that selects the intermediate layer to be calculated so as not to exceed the upper limit of.
請求項1又は2に記載の情報処理装置であって、
前記複数の中間層は、
第1中間層と、
前記第1中間層の演算結果から独立した第2中間層と、を含み、
前記演算対象選択部は、前記第1中間層の演算により発生する前記演算部の負荷と前記第2中間層の演算により発生する前記演算部の負荷と前記所定のプログラムの演算により発生する前記演算部の負荷との合計が前記演算部の負荷の上限を超えない場合、前記第1中間層及び前記第2中間層を前記演算すべき中間層として選択する、情報処理装置。
The information processing device according to claim 1 or 2.
The plurality of intermediate layers
The first middle layer and
The second intermediate layer, which is independent of the calculation result of the first intermediate layer, is included.
The calculation target selection unit includes the load of the calculation unit generated by the calculation of the first intermediate layer, the load of the calculation unit generated by the calculation of the second intermediate layer, and the calculation generated by the calculation of the predetermined program. An information processing apparatus that selects the first intermediate layer and the second intermediate layer as the intermediate layer to be calculated when the total with the load of the unit does not exceed the upper limit of the load of the calculation unit.
請求項1〜3のいずれか1項に記載の情報処理装置であって、
前記演算部は、第1中間層を含む第1ニューラルネットワークと、第2中間層を含む第2ニューラルネットワークとを演算し、
前記演算対象選択部は、前記第1中間層の演算により発生する前記演算部の負荷と前記第2中間層の演算により発生する前記演算部の負荷と前記所定のプログラムの演算により発生する前記演算部の負荷との合計が前記演算部の負荷の上限を超えない場合、前記第1中間層及び前記第2中間層を前記演算すべき中間層として特定する、情報処理装置。
The information processing device according to any one of claims 1 to 3.
The calculation unit calculates the first neural network including the first intermediate layer and the second neural network including the second intermediate layer.
The calculation target selection unit includes the load of the calculation unit generated by the calculation of the first intermediate layer, the load of the calculation unit generated by the calculation of the second intermediate layer, and the calculation generated by the calculation of the predetermined program. An information processing apparatus that specifies the first intermediate layer and the second intermediate layer as the intermediate layer to be calculated when the total with the load of the unit does not exceed the upper limit of the load of the calculation unit.
複数の中間層を含むニューラルネットワークの演算と、前記ニューラルネットワークと異なるプログラムの演算とを実行する演算部を備える情報処理装置の制御方法であって、
前記ニューラルネットワークの構造と、前記複数の中間層の各々における演算量を示す演算量データと、前記演算部の負荷とに基づいて、前記複数の中間層のうち演算すべき中間層を選択するステップと、
前記選択された中間層の演算を前記演算部に指示するステップと、を備える情報処理装置の制御方法。
It is a control method of an information processing apparatus including an arithmetic unit that executes an operation of a neural network including a plurality of intermediate layers and an operation of a program different from the neural network.
A step of selecting an intermediate layer to be calculated from the plurality of intermediate layers based on the structure of the neural network, the calculation amount data indicating the calculation amount in each of the plurality of intermediate layers, and the load of the calculation unit. When,
A control method of an information processing apparatus including a step of instructing the calculation unit to perform a calculation of the selected intermediate layer.
JP2019230385A 2019-12-20 2019-12-20 information processing equipment Active JP7373387B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019230385A JP7373387B2 (en) 2019-12-20 2019-12-20 information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019230385A JP7373387B2 (en) 2019-12-20 2019-12-20 information processing equipment

Publications (2)

Publication Number Publication Date
JP2021099596A true JP2021099596A (en) 2021-07-01
JP7373387B2 JP7373387B2 (en) 2023-11-02

Family

ID=76541222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019230385A Active JP7373387B2 (en) 2019-12-20 2019-12-20 information processing equipment

Country Status (1)

Country Link
JP (1) JP7373387B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6756661B2 (en) 2017-04-28 2020-09-16 日立オートモティブシステムズ株式会社 Vehicle electronic control unit
JP6831347B2 (en) 2018-04-05 2021-02-17 日本電信電話株式会社 Learning equipment, learning methods and learning programs
US10817042B2 (en) 2018-09-27 2020-10-27 Intel Corporation Power savings for neural network architecture with zero activations during inference

Also Published As

Publication number Publication date
JP7373387B2 (en) 2023-11-02

Similar Documents

Publication Publication Date Title
US11704553B2 (en) Neural network system for single processing common operation group of neural network models, application processor including the same, and operation method of neural network system
JP5171118B2 (en) Arithmetic processing apparatus and control method thereof
Huang et al. Codenet: Efficient deployment of input-adaptive object detection on embedded fpgas
US20180260692A1 (en) System and method for training artificial intelligence systems using a sima based processor
JP7078758B2 (en) Improving machine learning models to improve locality
US11675997B2 (en) Device and method for processing convolution operation using kernel
CN110554913A (en) Neural network system, operation method thereof and application processor
CN104067227A (en) Branch prediction logic
TWI767231B (en) System and method for electronic system level modeling of machine learning
US20200183834A1 (en) Method and device for determining memory size
TW202141363A (en) Adaptive quantization for execution of machine learning models
CN111602117A (en) Task-critical AI processor with recording and playback support
JP2022007168A (en) Learning program, learning method and information processing apparatus
US20210397948A1 (en) Learning method and information processing apparatus
JP7373387B2 (en) information processing equipment
WO2020169182A1 (en) Method and apparatus for allocating tasks
CN112395045A (en) Virtual machine recovery and resource adjustment method thereof
Ito et al. Profiling based out-of-core hybrid method for large neural networks: poster
CN108881899B (en) Image prediction method and device based on optical flow field pyramid and electronic equipment
CN116451585A (en) Adaptive real-time learning task scheduling method based on target detection model
JP2008171153A (en) Task management apparatus
CN112541568A (en) Method, device and computer program for operating an artificial neural network
EP4310731A1 (en) Electronic device and controlling method of electronic device
CN113821471A (en) Processing method of neural network and electronic device
CN113994388A (en) Method and apparatus for managing neural network model

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220929

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230928

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: 20231011

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231023

R150 Certificate of patent or registration of utility model

Ref document number: 7373387

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150