WO2020039493A1 - Computation optimization device, method, and program - Google Patents

Computation optimization device, method, and program Download PDF

Info

Publication number
WO2020039493A1
WO2020039493A1 PCT/JP2018/030769 JP2018030769W WO2020039493A1 WO 2020039493 A1 WO2020039493 A1 WO 2020039493A1 JP 2018030769 W JP2018030769 W JP 2018030769W WO 2020039493 A1 WO2020039493 A1 WO 2020039493A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
arithmetic
explanatory variable
objective function
accuracy
Prior art date
Application number
PCT/JP2018/030769
Other languages
French (fr)
Japanese (ja)
Inventor
芙美代 鷹野
竹中 崇
誠也 柴田
浩明 井上
Original Assignee
日本電気株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電気株式会社 filed Critical 日本電気株式会社
Priority to PCT/JP2018/030769 priority Critical patent/WO2020039493A1/en
Priority to JP2020537921A priority patent/JP6973651B2/en
Publication of WO2020039493A1 publication Critical patent/WO2020039493A1/en

Links

Images

Classifications

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

Definitions

  • the operation optimization device of the present invention determines the operation accuracy of each layer in a discrimination model in which a plurality of layers each composed of one or more units are combined.
  • a discrimination model is a neural network.
  • the discrimination model is not limited to the neural network.
  • FIG. 3 is a schematic diagram showing an example of the above processing apparatus.
  • the processing device 18 includes, for example, a low-precision arithmetic circuit 5, a high-precision arithmetic circuit 6, a first memory 7, a second memory 8, and a third memory 9.
  • the low-precision arithmetic circuit 5, the high-precision arithmetic circuit 6, the first memory 7, the second memory 8, and the third memory 9 are connected via, for example, a bus 10.
  • the explanatory variable value acquiring unit 23 acquires the values of the explanatory variables (in this example, “inference accuracy” and “processing speed”).
  • the explanatory variable value obtaining unit 23 causes the actually existing processing device 18 (see FIG. 3) to execute the inference process, and obtains the values of “inference accuracy” and “processing speed” by actual measurement. It is.
  • the second mode is a mode in which the explanatory variable value obtaining unit 23 obtains the values of “inference accuracy” and “processing speed” by simulation. That is, the first mode is a mode in which the value of the explanatory variable is obtained by actual measurement, and the second mode is a mode in which the value of the explanatory variable is obtained by simulation.
  • the explanatory variable value acquisition unit 23 processes the number of the arithmetic units, the memory access amount derived based on the selected applied pattern, and the data transfer amount between the low precision arithmetic circuit 5 and the high precision arithmetic circuit 6.
  • the value of the processing speed may be calculated by substituting the value into the speed function. As a result, the explanatory variable value acquisition unit 23 can acquire the value of the processing speed based on the simulation.
  • the explanatory variable value acquiring unit 23 may acquire the value of the explanatory variable by actual measurement or by simulation. In any case, the explanatory variable value acquiring unit 23 acquires the values of the explanatory variables (in this example, “inference accuracy” and “processing speed”) for each application pattern.
  • the arithmetic accuracy of each layer of the neural network is determined by the first arithmetic accuracy (for example, It is possible to determine whether to use an 8-bit integer operation by the low-precision operation circuit 5 or to use the second operation accuracy (for example, a 32-bit floating-point operation by the high-precision operation circuit 6).
  • the explanatory variable value acquisition unit 23, the objective function calculation unit 25, and the application pattern determination unit 27 are realized by, for example, a CPU (Central Processing Unit) of a computer that operates according to an operation optimization program.
  • the CPU reads the operation optimization program from a program recording medium such as a program storage device. Then, the CPU may operate as the explanatory variable value acquisition unit 23, the objective function calculation unit 25, and the applied pattern determination unit 27 according to the operation optimization program.
  • a CPU Central Processing Unit
  • the explanatory variable value acquisition unit 23 also acquires a value of “circuit scale” in addition to “inference accuracy” and “processing speed”.
  • the design information stored in the design information storage unit 19 includes a design value of the number of arithmetic units included in the low-precision arithmetic circuit 5 and a design value of the number of arithmetic units included in the high-precision arithmetic circuit 6.
  • the design information stored in the design information storage unit 19 includes a design value of the number of arithmetic units included in the low-precision arithmetic circuit 5 and a design value of the number of arithmetic units included in the high-precision arithmetic circuit 6.
  • What is necessary is just to include a value and a design value of how many arithmetic units included in the low-precision arithmetic circuit 5 correspond to one arithmetic unit included in the high-precision arithmetic circuit 6.
  • one arithmetic unit included in the high-precision arithmetic circuit 6 will be described as equivalent to J arithmetic units included in the low-precision arithmetic circuit 5.
  • is a coefficient of “power consumption” and is determined in advance.
  • is defined as a positive value.
  • FIG. 12 is a schematic block diagram showing a configuration example of a computer according to the embodiment of the present invention or its modification.
  • the computer 1000 includes a CPU 1001, a main storage device 1002, an auxiliary storage device 1003, and an interface 1004.
  • the plurality of information processing devices, circuits, and the like may be centrally arranged or may be distributed.
  • the information processing device, the circuit, and the like may be realized as a form in which each is connected via a communication network, such as a client and server system or a cloud computing system.

Landscapes

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

Abstract

An explanatory variable value acquisition means 73 performs computation using a discrimination model obtained by combining multiple layers each composed of one or more units, to acquire a certain explanatory variable value for each of application patterns which are information specifying a layer to which a first computation circuit for performing computation with a first computation accuracy is to be applied, and a layer to which a second computation circuit for performing computation with a second computation accuracy higher than the first computation accuracy is to be applied. An objective function calculation means 75 calculates, for the application pattern, the value of an objective function expressed with the certain explanatory variable. An application pattern determination means 77 determines such an application pattern that the value of the objective function becomes minimum among the application patterns.

Description

演算最適化装置、方法およびプログラムArithmetic optimization device, method and program
 本発明は、例えば、ニューラルネットワーク等の判別モデルを用いた演算を最適化する演算最適化装置、演算最適化方法および演算最適化プログラムに関する。 The present invention relates to, for example, an operation optimization device, an operation optimization method, and an operation optimization program for optimizing an operation using a discriminant model such as a neural network.
 与えられたデータに対する推論を、モデルを用いることによって行う場合がある。このようなモデルは、判別モデルと呼ばれる。例えば、画像データが与えられ、その画像データと、判別モデルとによって、その画像データが表わしている物(画像に写っている物)を推論する場合がある。 推 Inferences on given data may be made using models. Such a model is called a discriminant model. For example, there is a case where image data is given and an object represented by the image data (an object shown in an image) is inferred by the image data and the discrimination model.
 判別モデルの例として、ニューラルネットワークが知られている。ニューラルネットワークでは、複数の層が結合されたモデルであり、それぞれの層は、1つ以上のユニット(ニューロン)で構成されている。ニューラルネットワークを用いて推論処理を行う場合、入力データを入力層に入力し、入力層側から出力層側に順方向に演算を行うことによって、入力データに関する推論結果が得られる。 ニ ュ ー A neural network is known as an example of the discrimination model. The neural network is a model in which a plurality of layers are connected, and each layer includes one or more units (neurons). When inference processing is performed using a neural network, input data is input to the input layer, and an operation is performed in the forward direction from the input layer side to the output layer side to obtain an inference result regarding the input data.
 ニューラルネットワークは、深層学習によって学習される。 Neural networks are learned by deep learning.
 ニューラルネットワークを用いた演算を行うためのツールが、例えば、非特許文献1に記載されている。 A tool for performing an operation using a neural network is described in Non-Patent Document 1, for example.
 ニューラルネットワークを用いた演算を行うための既存のツールには、ニューラルネットワークの全ての層の演算精度を一律に変えることができるものがある。例えば、ニューラルネットワークの全ての層の演算を、浮動小数点演算に設定したり、整数演算に設定したりすることができるツールがある。また、そのような設定は、ユーザ(人間)が行う。 既存 Some existing tools for performing operations using a neural network can uniformly change the operation accuracy of all layers of the neural network. For example, there is a tool that can set the operation of all layers of the neural network to a floating-point operation or an integer operation. Such setting is performed by a user (human).
 前述のように、ニューラルネットワークを用いた演算を行うための既存のツールには、ニューラルネットワークの全ての層の演算精度を一律に変えることができるものがある。しかし、そのようなツールでは、個々の層の演算精度をそれぞれ個別に設定することができない。そのため、ニューラルネットワークを用いた演算を最適化することが困難であった。 As described above, some existing tools for performing operations using a neural network can uniformly change the operation accuracy of all layers of the neural network. However, with such a tool, the calculation accuracy of each layer cannot be set individually. Therefore, it has been difficult to optimize the calculation using the neural network.
 例えば、ニューラルネットワークの全ての層の演算を浮動小数点演算に設定した場合には、高精度で演算を行えるが、消費電力等に関する効率は低下する。逆に、ニューラルネットワークの全ての層の演算を整数演算に設定した場合には、消費電力等に関する効率は向上するが、演算精度は低下する。 For example, when the calculations of all the layers of the neural network are set to floating point calculations, the calculations can be performed with high accuracy, but the efficiency with respect to power consumption and the like is reduced. Conversely, when the calculations of all layers of the neural network are set to integer calculations, the efficiency with respect to power consumption and the like is improved, but the calculation accuracy is reduced.
 また、既存のツールでは、ニューラルネットワーク全体の演算精度を、浮動小数点演算にするか、整数演算にするかを、ユーザが判断しなければならなかった。 既存 In addition, with existing tools, the user had to decide whether to use floating point arithmetic or integer arithmetic for the arithmetic accuracy of the entire neural network.
 そこで、本発明は、判別モデルを用いた演算を最適化できるように、判別モデルの各層における演算精度を自動的に定めることができる演算最適化装置、演算最適化方法および演算最適化プログラムを提供することを目的とする。 Therefore, the present invention provides an operation optimization device, an operation optimization method, and an operation optimization program that can automatically determine the operation accuracy in each layer of the discrimination model so that the operation using the discrimination model can be optimized. The purpose is to do.
 本発明による演算最適化装置は、1つ以上のユニットでそれぞれ構成された複数の層が結合された判別モデルを用いた演算で、第1の演算精度で演算を行う第1の演算回路をどの層に適用し、第1の演算精度よりも高い第2の演算精度で演算を行う第2の演算回路をどの層に適用するかを定めた情報である適用パターン毎に、所定の説明変数の値を取得する説明変数値取得手段と、所定の説明変数で表される目的関数の値を、適用パターン毎に計算する目的関数計算手段と、目的関数の値が最小となる適用パターンを決定する適用パターン決定手段とを備えることを特徴とする。 An operation optimization device according to the present invention is an operation using a discriminant model in which a plurality of layers each composed of one or more units are combined, and includes a first operation circuit that performs an operation with a first operation accuracy. For each application pattern that is information that determines to which layer a second arithmetic circuit that applies to a layer and performs an arithmetic operation with a second arithmetic accuracy higher than the first arithmetic accuracy is defined by a predetermined explanatory variable. Explanatory variable value acquiring means for acquiring a value, objective function calculating means for calculating a value of an objective function represented by a predetermined explanatory variable for each applied pattern, and an applied pattern in which the value of the objective function is minimized. And an application pattern determining unit.
 また、本発明による演算最適化方法は、1つ以上のユニットでそれぞれ構成された複数の層が結合された判別モデルを用いた演算で、第1の演算精度で演算を行う第1の演算回路をどの層に適用し、第1の演算精度よりも高い第2の演算精度で演算を行う第2の演算回路をどの層に適用するかを定めた情報である適用パターン毎に、所定の説明変数の値を取得し、所定の説明変数で表される目的関数の値を、適用パターン毎に計算し、目的関数の値が最小となる適用パターンを決定することを特徴とする。 In addition, the operation optimization method according to the present invention is a first operation circuit that performs an operation with a first operation accuracy by an operation using a discriminant model in which a plurality of layers each configured by one or more units are combined. Is applied to each layer, and a predetermined explanation is given for each application pattern that is information that determines to which layer the second arithmetic circuit that performs the arithmetic operation with the second arithmetic accuracy higher than the first arithmetic accuracy is applied. The method is characterized in that a value of a variable is obtained, a value of an objective function represented by a predetermined explanatory variable is calculated for each applied pattern, and an applied pattern in which the value of the objective function is minimized is determined.
 また、本発明による演算最適化プログラムは、コンピュータに、1つ以上のユニットでそれぞれ構成された複数の層が結合された判別モデルを用いた演算で、第1の演算精度で演算を行う第1の演算回路をどの層に適用し、第1の演算精度よりも高い第2の演算精度で演算を行う第2の演算回路をどの層に適用するかを定めた情報である適用パターン毎に、所定の説明変数の値を取得する説明変数値取得処理、所定の説明変数で表される目的関数の値を、適用パターン毎に計算する目的関数計算処理、および、目的関数の値が最小となる適用パターンを決定する適用パターン決定処理を実行させることを特徴とする。 In addition, the operation optimization program according to the present invention is a computer that performs an operation using a discrimination model in which a plurality of layers each composed of one or more units are combined, and performs an operation with a first operation accuracy. For each application pattern, which is information that determines to which layer the arithmetic circuit of the above is applied and to which layer the second arithmetic circuit that performs the operation with the second arithmetic accuracy higher than the first arithmetic accuracy is applied Explanatory variable value acquisition processing for acquiring the value of a predetermined explanatory variable, objective function calculation processing for calculating the value of an objective function represented by the predetermined explanatory variable for each applied pattern, and the value of the objective function is minimized An application pattern determination process for determining an application pattern is performed.
 本発明によれば、判別モデルを用いた演算を最適化できるように、判別モデルの各層における演算精度を自動的に定めることができる。 According to the present invention, the calculation accuracy in each layer of the discrimination model can be automatically determined so that the calculation using the discrimination model can be optimized.
ニューラルネットワークを用いた推論処理を示す模式図である。It is a schematic diagram which shows the inference process using a neural network. 1つのユニットに着目したときの当該ユニットの入出力および他のユニットとの結合の例を示す説明図である。FIG. 9 is an explanatory diagram showing an example of input / output of the unit and connection with another unit when focusing on one unit. ニューラルネットワークの各層のうち、一部の層の演算を低精度で実行し、残りの層の演算を高精度で実行する処理装置の例を示す模式図である。It is a schematic diagram which shows the example of the processing apparatus which performs the calculation of some layers with low precision among the layers of a neural network, and performs the calculation of the remaining layers with high precision. 低精度演算回路の一例を示す概略構成図である。FIG. 3 is a schematic configuration diagram illustrating an example of a low-precision arithmetic circuit. MACの構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration example of a MAC. ニューラルネットワークを用いた推論処理の処理経過の例を示すフローチャートである。It is a flowchart which shows the example of a process progress of the inference process using a neural network. 本発明の演算最適化装置の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of an operation optimization device according to the present invention. 適用パターンの例を示す模式図である。It is a schematic diagram which shows the example of an application pattern. 処理装置を備える演算最適化装置の構成例を示すブロック図である。It is a block diagram showing an example of composition of an operation optimization device provided with a processing unit. 設計情報記憶部を備える演算最適化装置の構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration example of an operation optimization device including a design information storage unit. 本発明の実施形態の演算最適化装置の処理経過の例を示すフローチャートである。It is a flowchart which shows the example of a process progress of the operation optimization apparatus of embodiment of this invention. 本発明の実施形態またはその変形例に係るコンピュータの構成例を示す概略ブロック図である。FIG. 11 is a schematic block diagram illustrating a configuration example of a computer according to an embodiment of the present invention or a modification thereof. 本発明の演算最適化装置の概要を示すブロック図である。It is a block diagram showing the outline of the operation optimization device of the present invention.
 本発明の演算最適化装置は、1つ以上のユニットでそれぞれ構成された複数の層が結合された判別モデルにおける各層の演算精度を決定する。このような判別モデルの例として、ニューラルネットワークがある。以下の説明では、判別モデルがニューラルネットワークである場合を例にして説明する。ただし、判別モデルは、ニューラルネットワークに限定されるわけではない。 The operation optimization device of the present invention determines the operation accuracy of each layer in a discrimination model in which a plurality of layers each composed of one or more units are combined. An example of such a discrimination model is a neural network. In the following description, a case where the discrimination model is a neural network will be described as an example. However, the discrimination model is not limited to the neural network.
 また、以下の説明では、ニューラルネットワークを用いた処理として、与えられた入力データが示す内容を推論する処理を例にして説明する。例えば、画像データが与えられ、その画像データと、ニューラルネットワークとによって、その画像データが表わしている物(画像に写っている物)を推論する処理を例にして説明する。 In the following description, as a process using a neural network, a process of inferring the content indicated by given input data will be described as an example. For example, an example will be described in which image data is provided, and a process of inferring an object represented by the image data (an object in an image) by the image data and a neural network.
 ただし、ニューラルネットワークを用いた処理は、上記の推論処理に限定されず、例えば、ニューラルネットワークの各層のパラメタ更新処理等もある。後述の実施形態では、本発明の演算最適化装置が、推論処理を行う場合におけるニューラルネットワークの各層の演算精度を決定する場合を例にして説明するが、上記のパラメタ更新処理等の他の処理も本発明に適用可能である。 However, the processing using the neural network is not limited to the above-described inference processing, and includes, for example, parameter updating processing for each layer of the neural network. In the embodiment described later, a case will be described as an example where the operation optimization device of the present invention determines the operation accuracy of each layer of the neural network when performing the inference process, but other processes such as the above-described parameter update process Is also applicable to the present invention.
 図1は、ニューラルネットワークを用いた推論処理を示す模式図である。図1において、ニューラルネットワークにおけるニューロンに相当するユニット51が楕円で表されている。各層には、1つ以上のユニットが存在する。また、線分52(図中のユニット間を結ぶ線)は、ユニット間結合を表わす。また、矢印53(図中の右向きの太線矢印)は、推論処理を模式的に表している。なお、図1では、各ユニット51への入力が前段の層のユニットの出力となるフィードフォワード型のニューラルネットワークの例を示しているが、各ユニット51への入力はこれに限られない。例えば、時系列情報を保持している場合には、リカレント型のニューラルネットワークのように、各ユニット51への入力に、前の時刻における前段の層のユニットの出力を含めることも可能である。なお、そのような場合も、推論処理の方向は、入力層から出力層への向かう方向(順方向)であるとみなされる。このように入力層から所定の順番で行われる推論処理は「順伝搬」とも呼ばれる。以下の説明では、入力層を第0層と記し、出力層を第n層と記す。 FIG. 1 is a schematic diagram showing an inference process using a neural network. In FIG. 1, a unit 51 corresponding to a neuron in the neural network is represented by an ellipse. Each layer has one or more units. A line segment 52 (a line connecting the units in the figure) represents the connection between the units. An arrow 53 (bold arrow pointing right in the figure) schematically represents the inference processing. Although FIG. 1 shows an example of a feedforward neural network in which an input to each unit 51 is an output of a unit in a preceding layer, the input to each unit 51 is not limited to this. For example, when time-series information is held, the input to each unit 51 may include the output of the unit of the preceding layer at the previous time, as in a recurrent neural network. In such a case as well, the direction of the inference processing is considered to be the direction (forward direction) from the input layer to the output layer. Such inference processing performed in a predetermined order from the input layer is also called “forward propagation”. In the following description, the input layer is referred to as a 0th layer, and the output layer is referred to as an nth layer.
 図2は、1つのユニット51に着目したときの当該ユニット51の入出力および他のユニットとの結合の例を示す説明図である。図2(a)は、1つのユニット51の入出力の例を示し、図2(b)は、2層に並べられたユニット51の間の結合の例を示す。図2(a)に示すように、1つのユニット51に対して4つの入力(x~x)と1つの出力(z)があった場合に、当該ユニット51の動作は、例えば、式(1A)のように表される。ここで、f()は活性化関数を表わしている。 FIG. 2 is an explanatory diagram showing an example of input / output of the unit 51 and connection with another unit when focusing on one unit 51. FIG. 2A shows an example of input and output of one unit 51, and FIG. 2B shows an example of coupling between the units 51 arranged in two layers. As shown in FIG. 2A, when there are four inputs (x 1 to x 4 ) and one output (z) to one unit 51, the operation of the unit 51 is expressed by, for example, an equation (1A). Here, f () represents an activation function.
z=f(u) ・・・(1A)
ただし、u=a+w+w+w+w ・・・(1B)
z = f (u) (1A)
However, u = a + w 1 x 1 + w 2 x 2 + w 3 x 3 + w 4 x 4 ··· (1B)
 式(1B)において、aは切片、w~wは各入力(x~x)に対応した重み等のパラメタを表す。 In the equation (1B), a represents an intercept, and w 1 to w 4 represent parameters such as weights corresponding to the respective inputs (x 1 to x 4 ).
 一方、図2(b)に示すように、2層に並べられた層間で各ユニット51が結合されている場合、後段の層に着目すると、当該層(2層のうちの後段の層)内の各ユニットへの入力(それぞれx~x)に対する各ユニット51の出力(z~z)は、例えば、次のように表される。なお、iは同一層内のユニットの識別子(本例ではi=1~3)である。 On the other hand, as shown in FIG. 2B, when the units 51 are connected between the layers arranged in two layers, focusing on the latter layer, the inner layer (the latter layer of the two layers) The output (z 1 to z 4 ) of each unit 51 with respect to the input to each unit (x 1 to x 4 ) is expressed as follows, for example. Note that i is an identifier of a unit in the same layer (i = 1 to 3 in this example).
=f(u) ・・・(2A)
ただし、u=a+wi,1+wi,2+wi,3+wi,4
                       ・・・(2B)
z i = f (u i ) (2A)
However, u i = a + w i , 1 x 1 + w i, 2 x 2 + w i, 3 x 3 + w i, 4 x 4
... (2B)
 以下では、式(2B)を単純化して、u=Σwi,k*xと記す場合がある。なお、切片aは省略した。なお、切片aを値1の定数項の係数(パラメタの1つ)とみなすことも可能である。ここで、kは、当該層における各ユニット51への入力の識別子を表わす。より具体的には、kは、その入力を行う他のユニットの識別子を表わしているということもできる。このとき当該層における各ユニット51への入力が前段の層の各ユニットの出力のみである場合には、上記の簡略式を、u (L)=Σwi,k (L)*x (L-1)と記すことも可能である。なお、Lは層の識別子を表わす。これらの式において、wi,kが、当該層(第L層)における各ユニットiのパラメタに相当する。このパラメタは、より具体的には、各ユニットiと他のユニットkとの結合(ユニット間結合)の重みに相当する。以下では、ユニットを特に区別せず、ユニットの出力値を決める関数(活性化関数)を簡略化して、z=Σw*xと記す場合がある。 In the following, equation (2B) may be simplified and written as u i = Σwi , k * x k . The section a is omitted. In addition, the intercept a can be regarded as a coefficient (one of parameters) of a constant term having a value of 1. Here, k represents an identifier of an input to each unit 51 in the layer. More specifically, it can be said that k represents an identifier of another unit that performs the input. At this time, if the input to each unit 51 in the layer is only the output of each unit in the previous layer, the above simplified expression is expressed as u i (L) = Σwi , k (L) * x k ( It is also possible to write L-1) . Note that L represents a layer identifier. In these equations, w i, k corresponds to the parameter of each unit i in the layer (L-th layer). More specifically, this parameter corresponds to the weight of the connection between each unit i and another unit k (inter-unit connection). In the following, a function (activation function) for determining an output value of a unit may be simplified as z = Σw * x without distinguishing the unit.
 上記の例において、ある層の各ユニット51について、入力xから出力zを求める演算が、その層における推論処理に相当する。 In the above example, for each unit 51 in a certain layer, the operation of obtaining the output z from the input x corresponds to the inference processing in that layer.
 本発明の実施形態を説明する前に、ニューラルネットワークの各層のうち、一部の層の演算を低精度で実行し、残りの層の演算を高精度で実行する処理装置の例について説明する。図3は、上記の処理装置の例を示す模式図である。処理装置18は、例えば、低精度演算回路5と、高精度演算回路6と、第1メモリ7と、第2メモリ8と、第3メモリ9とを備える。低精度演算回路5、高精度演算回路6、第1メモリ7、第2メモリ8および第3メモリ9は、例えば、バス10を介して接続される。 Before describing the embodiments of the present invention, an example of a processing apparatus that performs low-precision calculations on some of the layers of the neural network and performs high-precision calculations on the remaining layers will be described. FIG. 3 is a schematic diagram showing an example of the above processing apparatus. The processing device 18 includes, for example, a low-precision arithmetic circuit 5, a high-precision arithmetic circuit 6, a first memory 7, a second memory 8, and a third memory 9. The low-precision arithmetic circuit 5, the high-precision arithmetic circuit 6, the first memory 7, the second memory 8, and the third memory 9 are connected via, for example, a bus 10.
 低精度演算回路5は、推論処理において、ニューラルネットワークの各層のうち、一部の層の演算を第1の演算精度で実行する。 (4) In the inference processing, the low-precision arithmetic circuit 5 executes the arithmetic of some of the layers of the neural network with the first arithmetic accuracy.
 第1メモリ7は、低精度演算回路5が演算を実行する際に使用するメモリであり、低精度演算回路5は、第1メモリ7に適宜アクセスしながら、演算を実行する。 (1) The first memory 7 is a memory used when the low-precision arithmetic circuit 5 executes an operation. The low-precision arithmetic circuit 5 executes an operation while appropriately accessing the first memory 7.
 高精度演算回路6は、推論処理において、ニューラルネットワークの各層のうち、残りの層の演算を、第1の演算精度よりも高い第2の演算精度で実行する。 (4) In the inference process, the high-precision arithmetic circuit 6 executes the arithmetic of the remaining layers of the neural network with a second arithmetic accuracy higher than the first arithmetic accuracy.
 第2メモリ8は、高精度演算回路6が演算を実行する際に使用するメモリであり、高精度演算回路6は、第2メモリ8に適宜アクセスしながら、演算を実行する。 The second memory 8 is a memory used when the high-precision operation circuit 6 executes an operation. The high-precision operation circuit 6 executes an operation while appropriately accessing the second memory 8.
 なお、第1メモリ7および第2メモリ8は、異なるメモリで実現されも、単一のメモリで実現されていてもよい。第1メモリ7および第2メモリ8が単一のメモリで実現される場合には、その単一のメモリが、低精度演算回路5のアクセス領域と、高精度演算回路6のアクセス領域とに分けられていればよい。 The first memory 7 and the second memory 8 may be realized by different memories, or may be realized by a single memory. When the first memory 7 and the second memory 8 are realized by a single memory, the single memory is divided into an access area of the low-precision arithmetic circuit 5 and an access area of the high-precision arithmetic circuit 6. It should just be done.
 また、第3メモリ9は、低精度演算回路5と高精度演算回路6がデータを授受する際に用いられるデータ授受用メモリである。なお、第3メモリ9が設けられていなくてもよい。すなわち、低精度演算回路5と高精度演算回路6が、第3メモリ9(データ授受用メモリ)を介さずに、通信によってデータを授受してもよい。 {Circle around (3)} The third memory 9 is a data exchange memory used when the low precision arithmetic circuit 5 and the high precision arithmetic circuit 6 exchange data. Note that the third memory 9 may not be provided. That is, the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 may exchange data by communication without passing through the third memory 9 (memory for data exchange).
 高精度演算回路6の演算精度(第2の演算精度)は、低精度演算回路5の演算精度(第1の演算精度)よりも高い。なお、演算に用いる数値データの値域の広さ・細かさの尺度(より具体的には、演算回路におけるビット幅および小数点の取り扱い等で定まる数値データの値域の広さ・細かさの尺度)を、「精度」または「演算精度」と呼ぶ。 (4) The calculation accuracy (second calculation accuracy) of the high-precision calculation circuit 6 is higher than the calculation accuracy (first calculation accuracy) of the low-precision calculation circuit 5. The scale of the range and fineness of the range of the numerical data used for the calculation (more specifically, the scale of the range and fineness of the range of the numerical data determined by the bit width and the handling of the decimal point in the arithmetic circuit) , “Accuracy” or “operation accuracy”.
 以下、低精度演算回路5の演算精度が8ビットの整数演算であり、高精度演算回路6の演算精度が32ビットの浮動小数点演算である場合を例にして説明する。ただし、低精度演算回路5の演算精度および高精度演算回路6の演算精度は、この例に限定されず、高精度演算回路6の演算精度が、低精度演算回路5の演算精度よりも高ければよい。 Hereinafter, a case will be described as an example where the operation precision of the low-precision operation circuit 5 is an 8-bit integer operation and the operation accuracy of the high-precision operation circuit 6 is a 32-bit floating-point operation. However, the calculation accuracy of the low-precision calculation circuit 5 and the calculation accuracy of the high-precision calculation circuit 6 are not limited to this example, as long as the calculation accuracy of the high-precision calculation circuit 6 is higher than the calculation accuracy of the low-precision calculation circuit 5. Good.
 低精度演算回路5および高精度演算回路6は、例えば、GPU(Graphics Processing Unit)に実装される。 The low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 are implemented in, for example, a GPU (Graphics Processing Unit).
 図4は、低精度演算回路5の一例を示す概略構成図である。図4に例示するように、低精度演算回路5は、例えば、複数のMAC(Multiplier-Accumulator)221を並列に接続した構成であってもよい。  FIG. 4 is a schematic configuration diagram showing an example of the low-precision arithmetic circuit 5. As illustrated in FIG. 4, the low-precision arithmetic circuit 5 may have, for example, a configuration in which a plurality of MACs (Multiplier-Accumulators) 221 are connected in parallel.
 同様に、高精度演算回路6も、図4に例示するように、複数のMACを並列に接続した構成であってもよい。ただし、低精度演算回路5に設けられるMAC221の演算精度よりも、高精度演算回路6に設けられるMACの演算精度の方が高い。 Similarly, the high-precision arithmetic circuit 6 may have a configuration in which a plurality of MACs are connected in parallel as illustrated in FIG. However, the operation accuracy of the MAC provided in the high-precision operation circuit 6 is higher than the operation accuracy of the MAC 221 provided in the low-accuracy operation circuit 5.
 MACは、低精度演算回路5や高精度演算回路6に設けられる演算器の一例である。 MAC is an example of an arithmetic unit provided in the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6.
 図5は、MAC221の構成例を示すブロック図である。MAC221は、乗算器234と、加算器235と、3つの入力を保持する記憶素子231~233と、1つの出力を保持する記憶素子236とを備えていてもよい。図5に例示するMAC221は、3つの変数a,w,xを受け取ると、1つの出力変数z=a+w*xを計算する演算回路である。本例において、zがユニットの出力に相当し、a,wがパラメタに相当し、xがユニットの入力に相当する。MAC221は、3つの変数w,x,aをそれぞれ、記憶素子231,232,233を介して受け取る。計算されたzは、記憶素子236を介して外部に送られる。このような構成において、MAC221の演算精度は、乗算器234や加算器235のビット幅および小数点の取り扱い(浮動小数点か固定小数点か等)により決定される。例えば、低精度演算回路5に設けられるMAC221では、乗算器234および加算器235による演算が、低精度演算回路5の演算精度(例えば、8ビットの整数演算)に対応していればよい。 FIG. 5 is a block diagram showing a configuration example of the MAC 221. The MAC 221 may include a multiplier 234, an adder 235, storage elements 231 to 233 holding three inputs, and a storage element 236 holding one output. The MAC 221 illustrated in FIG. 5 is an arithmetic circuit that calculates one output variable z = a + w * x when receiving three variables a, w, and x. In this example, z corresponds to the output of the unit, a and w correspond to the parameters, and x corresponds to the input of the unit. The MAC 221 receives three variables w, x, and a via the storage elements 231, 232, and 233, respectively. The calculated z is sent to the outside via the storage element 236. In such a configuration, the operation accuracy of the MAC 221 is determined by the bit width of the multiplier 234 and the adder 235 and the handling of the decimal point (floating point or fixed point, etc.). For example, in the MAC 221 provided in the low-precision operation circuit 5, the operation by the multiplier 234 and the adder 235 only needs to correspond to the operation accuracy of the low-precision operation circuit 5 (for example, an 8-bit integer operation).
 高精度演算回路6に設けられるMACも、図5に示す構成と同様に表すことができる。ただし、高精度演算回路6に設けられるMACでは、乗算器234および加算器235による演算が、高精度演算回路6の演算精度(例えば、32ビットの浮動小数点演算)に対応する。 (5) The MAC provided in the high-precision arithmetic circuit 6 can be represented in the same manner as the configuration shown in FIG. However, in the MAC provided in the high-precision operation circuit 6, the operation by the multiplier 234 and the adder 235 corresponds to the operation accuracy of the high-precision operation circuit 6 (for example, 32-bit floating point operation).
 なお、低精度演算回路5および高精度演算回路6の構成は、図4に例示する構成に限定されない。図4に示す構成とは異なる構成によって、低精度演算回路5および高精度演算回路6が実現されていてもよい。例えば、低精度演算回路5および高精度演算回路6は、MAC以外の演算器を備える構成であってもよい。 The configurations of the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 are not limited to the configuration illustrated in FIG. The low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 may be realized by a configuration different from the configuration illustrated in FIG. For example, the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 may be configured to include an arithmetic unit other than the MAC.
 図6は、ニューラルネットワークを用いた推論処理の処理経過の例を示すフローチャートである。 FIG. 6 is a flowchart showing an example of the progress of inference processing using a neural network.
 低精度演算回路5に入力データが与えられると(ステップS111)、低精度演算回路5は、ニューラルネットワークの第1層から第(k-1)層までの順伝搬を、第1の演算精度で行う(ステップS112)。すなわち、低精度演算回路5は、第1層から第(k-1)層までの各層に含まれる各ユニットの出力を計算する推論演算を、第1の演算精度で実行する。 When input data is given to the low-precision arithmetic circuit 5 (step S111), the low-precision arithmetic circuit 5 performs forward propagation from the first layer to the (k-1) th layer of the neural network with the first arithmetic precision. Perform (Step S112). That is, the low-precision arithmetic circuit 5 executes the inference operation for calculating the output of each unit included in each of the first to (k-1) th layers with the first arithmetic accuracy.
 次に、低精度演算回路5は、ステップS112の演算結果を第3メモリ9に保存する(ステップS113)。具体的には、低精度演算回路5は、第(k-1)層の各ユニットからの出力を、第3メモリ9に保存する。 Next, the low-precision arithmetic circuit 5 stores the arithmetic result of step S112 in the third memory 9 (step S113). Specifically, the low-precision arithmetic circuit 5 stores the output from each unit of the (k−1) th layer in the third memory 9.
 次に、低精度演算回路5は、高精度演算回路6は、ステップS112の演算結果(第(k-1)層の各ユニットからの出力)を、第3メモリ9から読み出す(ステップS114)。 Next, in the low-precision arithmetic circuit 5, the high-precision arithmetic circuit 6 reads out the operation result in step S112 (output from each unit of the (k-1) th layer) from the third memory 9 (step S114).
 ステップS113,S114において、低精度演算回路5および高精度演算回路6は、データ(ステップS112の演算結果。具体的には、第(k-1)層の各ユニットからの出力。)を、第3メモリ9を介して、授受していることになる。 In steps S113 and S114, the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 output the data (the operation result of step S112, specifically, the output from each unit of the (k-1) th layer). That is, they are being exchanged via the third memory 9.
 なお、低精度演算回路5および高精度演算回路6は、第3メモリ9を介さずに、通信によって直接、データを授受してもよい。 The low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 may directly exchange data by communication without passing through the third memory 9.
 ステップS114の後、高精度演算回路6は、ニューラルネットワークの第k層から第n層までの順伝搬を、第2の演算精度で行う(ステップS115)。すなわち、高精度演算回路6は、第k層から第n層までの各層に含まれる各ユニットの出力を計算する推論演算を、第2の計算精度で実行する。 の 後 After step S114, the high-precision arithmetic circuit 6 performs forward propagation from the k-th layer to the n-th layer of the neural network with the second arithmetic accuracy (step S115). That is, the high-precision arithmetic circuit 6 executes the inference operation for calculating the output of each unit included in each of the layers from the k-th layer to the n-th layer with the second calculation accuracy.
 なお、図6に示す処理経過において、ニューラルネットワークの入力層を第0層とし、第n層が出力層であるものとする。また、上記の第(k-1)層は、入力層(第0層)よりも後段でかつ出力層(第n層)よりも前段の中間層であるものとする。すなわち、kは、0<k-1<nを満たす整数であるものとする。 In the process shown in FIG. 6, it is assumed that the input layer of the neural network is the 0th layer and the nth layer is the output layer. The (k-1) th layer is an intermediate layer that is downstream of the input layer (0th layer) and upstream of the output layer (nth layer). That is, k is an integer satisfying 0 <k-1 <n.
 ステップS115で得られる第n層のユニットの出力が、推論結果を表わしているということができる。 出力 It can be said that the output of the unit of the n-th layer obtained in step S115 represents the inference result.
 以下、本発明の実施形態を図面を参照して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
 本実施形態では、本発明の演算最適化装置が、ニューラルネットワークにおける各層の演算精度を決定する場合を例にして説明する。また、前述のように、ニューラルネットワークを用いた処理として、与えられた入力データが示す内容を推論する処理を例にして説明する。例えば、画像データが与えられ、その画像データと、ニューラルネットワークとによって、その画像データが表わしている物(画像に写っている物)を推論する処理を例にして説明する。ただし、本発明は、ニューラルネットワークを用いた他の処理にも適用可能である。 In the present embodiment, a case will be described as an example where the operation optimization device of the present invention determines the operation accuracy of each layer in a neural network. In addition, as described above, a process of inferring the content indicated by given input data will be described as an example of the process using the neural network. For example, an example will be described in which image data is provided, and a process of inferring an object represented by the image data (an object in an image) by the image data and a neural network. However, the present invention is also applicable to other processes using a neural network.
 図7は、本発明の演算最適化装置の構成例を示すブロック図である。本発明の演算最適化装置は、判別モデル記憶部21と、データ記憶部22と、説明変数値取得部23と、目的関数記憶部24と、目的関数計算部25と、計算結果記憶部26と、適用パターン決定部27とを備える。 FIG. 7 is a block diagram showing a configuration example of the operation optimization device of the present invention. The operation optimization device of the present invention includes a discriminant model storage unit 21, a data storage unit 22, an explanatory variable value acquisition unit 23, an objective function storage unit 24, an objective function calculation unit 25, and a calculation result storage unit 26. , An application pattern determination unit 27.
 判別モデル記憶部21は、判別モデルとして、ニューラルネットワークを記憶する記憶装置である。 The discrimination model storage unit 21 is a storage device that stores a neural network as a discrimination model.
 データ記憶部22は、ニューラルネットワークを用いた推論処理の対象なるデータ(例えば、画像に写っている物を推論対象とする画像データ)を記憶する記憶装置である。データ記憶部22は、推論対象となるデータを複数個(N個とする。)、記憶し、個々のデータに対応する推論結果の正解データも記憶する。例えば、データ記憶部22は、N個の画像データと、個々の画像データに対応する正解データ(実際に画像に写っている物を示すデータ)とを記憶する。 The data storage unit 22 is a storage device that stores data to be subjected to inference processing using a neural network (for example, image data in which an object in an image is to be inferred). The data storage unit 22 stores a plurality (N) of data to be inferred, and also stores the correct answer data of the inference result corresponding to each data. For example, the data storage unit 22 stores N pieces of image data and correct answer data (data indicating an object actually shown in an image) corresponding to each piece of image data.
 目的関数記憶部24は、所定の説明変数(以下、単に説明変数と記す。)で表される目的関数を記憶する。目的関数を表わす式は、予め定められる。本実施形態では、少なくとも、ニューラルネットワークを用いた推論処理における「推論精度」と「処理速度」とを、上記の説明変数として用いるものとする。以下の説明では、説明を簡単にするために、まず、「推論精度」と「処理速度」とを説明変数とする場合について説明する。目的関数が、「推論精度」および「処理速度」に加え、さらに他の説明変数によって表されてもよいが、この場合については、後述する。 The objective function storage unit 24 stores an objective function represented by a predetermined explanatory variable (hereinafter simply referred to as an explanatory variable). An expression representing the objective function is predetermined. In the present embodiment, at least “inference precision” and “processing speed” in the inference processing using the neural network are used as the above-described explanatory variables. In the following description, for the sake of simplicity, first, a case will be described in which “inference accuracy” and “processing speed” are used as explanatory variables. The objective function may be represented by other explanatory variables in addition to “inference accuracy” and “processing speed”, but this case will be described later.
 ここで、「推論精度」とは、推論処理の演算結果(換言すれば、推論結果)の正確さである。 Here, the “inference precision” is the accuracy of the calculation result of the inference processing (in other words, the inference result).
 目的関数記憶部24は、目的関数として、例えば、以下の式(3)で表される関数を記憶する。 The objective function storage unit 24 stores, for example, a function represented by the following equation (3) as the objective function.
 目的関数=「推論精度」×α+「処理速度」×β  ・・・(3) {Objective function = "inference accuracy" x α + "processing speed" x β} (3)
 「推論精度」および「処理速度」は、説明変数である。αは、「推論精度」の係数であり、βは、「処理速度」の係数である。αおよびβの値は、予め決定されている。本実施形態では、αおよびβがいずれも、正の値として定められている場合を例にして説明する。 "Inference accuracy" and "processing speed" are explanatory variables. α is a coefficient of “inference accuracy”, and β is a coefficient of “processing speed”. The values of α and β are determined in advance. In the present embodiment, an example will be described in which α and β are both defined as positive values.
 説明変数値取得部23は、目的関数記憶部24に記憶されている目的関数において用いられている説明変数の値を取得する。本例では、ニューラルネットワークを用いた推論処理における「推論精度」および「処理速度」の値を取得する。 The explanatory variable value acquiring unit 23 acquires the value of the explanatory variable used in the objective function stored in the objective function storage unit 24. In this example, values of “inference precision” and “processing speed” in the inference processing using the neural network are acquired.
 また、説明変数値取得部23は、予め、複数種類の適用パターンを記憶している。適用パターンとは、判別モデル(本実施形態では、ニューラルネットワーク)を用いた演算で、低精度演算回路5(図3参照)をニューラルネットワークのどの層に適用し、高精度演算回路6(図3参照)をニューラルネットワークのどの層に適用するのかを定めた情報である。なお、本実施形態では、第1層以降に低精度演算回路5を適用し、いずれかの層と層の間で、層に適用する回路を低精度演算回路5から高精度演算回路6に切り替えてもよいものとする。ただし、説明を簡単にするために、その切り替えは最大で1回である場合を例にして説明する。また、第1層以降の全ての層に高精度演算回路6を適用してもよいものとする。 (4) The explanatory variable value acquisition unit 23 stores a plurality of types of application patterns in advance. The applied pattern is an operation using a discriminant model (in this embodiment, a neural network). The low-precision arithmetic circuit 5 (see FIG. 3) is applied to any layer of the neural network, and the high-precision arithmetic circuit 6 (FIG. 3). ) Is applied to which layer of the neural network. In this embodiment, the low-precision arithmetic circuit 5 is applied to the first and subsequent layers, and the circuit applied to the layer is switched from the low-precision arithmetic circuit 5 to the high-precision arithmetic circuit 6 between any of the layers. May be used. However, for simplicity of explanation, an example in which the switching is performed at most once will be described. Further, the high-precision arithmetic circuit 6 may be applied to all layers after the first layer.
 従って、本実施形態では、第1層から第p層までに低精度演算回路5を適用し、第p+1層から第q層までに高精度演算回路6を適用し、第q+1層から第n層(出力層)までに再び低精度演算回路5を適用するようなケースは、適用パターンから除外する。ただし、本発明において、このようなケースを適用パターンに含めてもよい。 Therefore, in this embodiment, the low-precision arithmetic circuit 5 is applied to the first to p-th layers, the high-precision arithmetic circuit 6 is applied to the p + 1-th to q-th layers, and the q + 1-th to n-th layers. The case where the low-precision arithmetic circuit 5 is applied again before (output layer) is excluded from the applied pattern. However, in the present invention, such a case may be included in the application pattern.
 図8は、適用パターンの例を示す模式図である。図8に示す各矩形は、ニューラルネットワークの各層を表わしている。 FIG. 8 is a schematic diagram showing an example of an application pattern. Each rectangle shown in FIG. 8 represents each layer of the neural network.
 図8に示す適用パターン1は、第1層から第n層までの全ての層に低精度演算回路5を適用することを定めている。換言すれば、適用パターン1は、第1層から第n層までの全ての層の演算を低精度演算回路5が実行することを定めている。 適用 Application pattern 1 shown in FIG. 8 specifies that the low-precision arithmetic circuit 5 is applied to all layers from the first layer to the n-th layer. In other words, the application pattern 1 defines that the low-precision arithmetic circuit 5 executes the arithmetic of all the layers from the first layer to the n-th layer.
 図8に示す適用パターン2は、第1層から第n-1層までの各層に低精度演算回路5を適用し、第n層に高精度演算回路6を適用することを定めている。換言すれば、適用パターン2は、第1層から第n-1層までの各層の演算を低精度演算回路5が実行し、第n層の演算を高精度演算回路6が実行することを定めている。 適用 Application pattern 2 shown in FIG. 8 specifies that the low-precision arithmetic circuit 5 is applied to each of the first to (n−1) th layers and the high-precision arithmetic circuit 6 is applied to the n-th layer. In other words, the application pattern 2 specifies that the low-precision operation circuit 5 executes the operation of each layer from the first layer to the (n-1) th layer, and the high-precision operation circuit 6 executes the operation of the n-th layer. ing.
 図8に示す適用パターン3は、第1層から第n-2層までの各層に低精度演算回路5を適用し、第n-1層および第n層に高精度演算回路6を適用することを定めている。 The application pattern 3 shown in FIG. 8 is that the low-precision arithmetic circuit 5 is applied to each of the first to n-2th layers, and the high-precision arithmetic circuit 6 is applied to the (n-1) th and n-th layers. Has been established.
 図8に示す適用パターンX-1は、第1層に低精度演算回路5を適用し、第2層から第n層までの各層に高精度演算回路6を適用することを定めている。換言すれば、適用パターンX-1は、第1層の演算を低精度演算回路5が実行し、第2層から第n層までの各層の演算を高精度演算回路6が実行することを定めている。 適用 Applied pattern X-1 shown in FIG. 8 specifies that the low-precision arithmetic circuit 5 is applied to the first layer and the high-precision arithmetic circuit 6 is applied to each of the second to n-th layers. In other words, the application pattern X-1 specifies that the low-precision operation circuit 5 executes the operation of the first layer and the high-precision operation circuit 6 executes the operations of each layer from the second layer to the n-th layer. ing.
 図8に示す適用パターンXは、第1層から第n層までの全ての層に高精度演算回路6を適用することを定めている。換言すれば、適用パターンXは、第1層から第n層までの全ての層の演算を高精度演算回路6が実行することを定めている。 適用 The application pattern X shown in FIG. 8 specifies that the high-precision arithmetic circuit 6 is applied to all layers from the first layer to the n-th layer. In other words, the application pattern X specifies that the high-precision operation circuit 6 executes the operation of all layers from the first layer to the n-th layer.
 図8に例示するような種々の適用パターンは、予め決定されていて、説明変数値取得部23は、個々の適用パターンを予め記憶している。そして、説明変数値取得部23は、個々の適用パターン毎に、説明変数「推論精度」の値、および、説明変数「処理速度」の値を取得する。 種 々 Various application patterns as illustrated in FIG. 8 are determined in advance, and the explanatory variable value acquisition unit 23 stores individual application patterns in advance. Then, the explanatory variable value acquiring unit 23 acquires the value of the explanatory variable “inference accuracy” and the value of the explanatory variable “processing speed” for each application pattern.
 適用パターンが異なれば、説明変数(本例では、「推論精度」および「処理速度」)の値も異なる。 れ ば Different application patterns have different values of explanatory variables (in this example, “inference accuracy” and “processing speed”).
 説明変数値取得部23が説明変数(本例では、「推論精度」および「処理速度」)の値を取得する態様として、2つの態様がある。第1の態様は、説明変数値取得部23が、実際に存在する処理装置18(図3参照)に推論処理を実行させ、実測により「推論精度」および「処理速度」の値を取得する態様である。第2の態様は、説明変数値取得部23がシミュレーションによって「推論精度」および「処理速度」の値を取得する態様である。すなわち、第1の態様は、説明変数の値を実測により取得する態様であり、第2の態様は、説明変数の値をシミュレーションにより取得する態様である。 There are two modes in which the explanatory variable value acquiring unit 23 acquires the values of the explanatory variables (in this example, “inference accuracy” and “processing speed”). In the first mode, the explanatory variable value obtaining unit 23 causes the actually existing processing device 18 (see FIG. 3) to execute the inference process, and obtains the values of “inference accuracy” and “processing speed” by actual measurement. It is. The second mode is a mode in which the explanatory variable value obtaining unit 23 obtains the values of “inference accuracy” and “processing speed” by simulation. That is, the first mode is a mode in which the value of the explanatory variable is obtained by actual measurement, and the second mode is a mode in which the value of the explanatory variable is obtained by simulation.
 説明変数値取得部23が実測により説明変数の値を取得する場合、演算最適化装置は、図9に示すように、処理装置18を備えていてもよい。処理装置18の構成や動作は、図3等を参照して既に説明しているので、ここでは説明を省略する。 In the case where the explanatory variable value acquisition unit 23 acquires the value of an explanatory variable by actual measurement, the arithmetic optimization device may include a processing device 18 as shown in FIG. Since the configuration and operation of the processing device 18 have already been described with reference to FIG. 3 and the like, the description is omitted here.
 また、処理装置18がまだ設計段階であり、まだ実際に処理装置18が存在していない場合もあり得る。その場合には、図10に示すように、演算最適化装置は、設計情報記憶部19を備えていてもよい。設計情報記憶部19は、処理装置18の設計情報を記憶する記憶装置である。設計情報の例として、処理装置18内の低精度演算回路5に設けられる演算器(例えば、MAC)の数や、処理装置18内の高精度演算回路6に設けられる演算器(例えば、MAC)の数等が挙げられる。ただし、設計情報は、これらの例に限定されない。説明変数値取得部23は、設計情報記憶部19に記憶された設計情報に基づいて、説明変数の値をシミュレーションにより取得すればよい。 処理 Also, there is a case where the processing device 18 is still in the design stage and the processing device 18 does not actually exist yet. In that case, as shown in FIG. 10, the operation optimization device may include a design information storage unit 19. The design information storage unit 19 is a storage device that stores design information of the processing device 18. Examples of the design information include the number of arithmetic units (for example, MAC) provided in the low-precision arithmetic circuit 5 in the processing device 18 and the arithmetic units (for example, MAC) provided in the high-precision arithmetic circuit 6 in the processing device 18. And the like. However, the design information is not limited to these examples. The explanatory variable value acquisition unit 23 may acquire the value of the explanatory variable by simulation based on the design information stored in the design information storage unit 19.
 まず、説明変数値取得部23が実測により説明変数の値を取得する場合の動作について説明する。ここでは、図9に示すように、演算最適化装置が、処理装置18を備えている場合を例にして説明する。 First, the operation when the explanatory variable value acquiring unit 23 acquires the value of the explanatory variable by actual measurement will be described. Here, a case will be described as an example where the operation optimization device includes a processing device 18 as shown in FIG.
 説明変数値取得部23が「処理速度」の値を実測によって取得する動作を説明する。説明変数値取得部23は、処理装置18に対して適用パターンを指定する。そして、説明変数値取得部23は、判別モデル記憶部21に記憶されているニューラルネットワークと、データ記憶部22に記憶されているデータとを、処理装置18に入力し、処理装置18に推論処理を実行させ、処理装置18がそのデータに対する推論処理を行う際の処理速度を計測すればよい。この結果、説明変数値取得部23は、処理速度の値を取得する。また、このとき、処理装置18は、指定された適用パターンに応じた動作で、推論処理を実行する。 The operation in which the explanatory variable value acquiring unit 23 acquires the value of “processing speed” by actual measurement will be described. The explanatory variable value acquisition unit 23 specifies an application pattern to the processing device 18. The explanatory variable value acquisition unit 23 inputs the neural network stored in the discrimination model storage unit 21 and the data stored in the data storage unit 22 to the processing device 18, and instructs the processing device 18 to perform inference processing. May be executed, and the processing speed when the processing device 18 performs the inference process on the data may be measured. As a result, the explanatory variable value acquisition unit 23 acquires the value of the processing speed. Further, at this time, the processing device 18 performs the inference process by an operation according to the specified application pattern.
 処理速度は、例えば、1つのデータに対する推論処理時間(換言すれば、1秒当たりに処理可能なデータ数の逆数)である。あるいは、説明変数値取得部23は、処理速度の値として、例えば、レイテンシまたはスループットの値を取得してもよい。この点は、シミュレーションによって処理速度の値を取得する場合においても同様である。 The processing speed is, for example, the inference processing time for one piece of data (in other words, the reciprocal of the number of pieces of data that can be processed per second). Alternatively, the explanatory variable value acquisition unit 23 may acquire, for example, a value of latency or throughput as a value of the processing speed. The same applies to the case where the value of the processing speed is obtained by simulation.
 なお、説明変数値取得部23は、1つのデータに関して、処理装置18に推論処理を実行させることで、処理速度の値を取得することができる。 The explanation variable value acquisition unit 23 can acquire the value of the processing speed by causing the processing device 18 to execute the inference process for one piece of data.
 説明変数値取得部23は、指定する適用パターンを順次、変更し、適用パターン毎に、実測によって処理速度の値を取得する。 The explanatory variable value acquisition unit 23 sequentially changes the application pattern to be specified, and acquires the value of the processing speed by actual measurement for each application pattern.
 説明変数値取得部23が「推論精度」の値を実測によって取得する動作を説明する。推論精度の値を実測によって取得する場合、説明変数値取得部23は、例えば、以下のように動作すればよい。説明変数値取得部23は、処理装置18に対して適用パターンを指定する。そして、説明変数値取得部23は、判別モデル記憶部21に記憶されているニューラルネットワークを処理装置18に入力する。また、説明変数値取得部23は、データ記憶部22に記憶されている複数個(N個とする。)のデータをそれぞれ、処理装置18に入力し、個々のデータ毎に、処理装置18に推論結果を導出させる。すなわち、説明変数値取得部23は、処理装置18にN回の推論処理を実行させる。このとき、処理装置18は、指定された適用パターンに応じた動作で、推論処理を実行する。この結果、N個の推論結果が得られる。説明変数値取得部23は、データ記憶部22に記憶されている正解データと、それぞれの推論結果とを照合し、N回の推論処理回数に対する、正解データが得られた推論処理回数の割合を算出し、さらにその割合の逆数を算出する。その割合の逆数が、推論精度の値に該当する。なお、説明変数値取得部23が推論精度の値を実測によって取得する動作は、上記の例に限定されない。 The operation in which the explanatory variable value acquiring unit 23 acquires the value of “inference accuracy” by actual measurement will be described. When acquiring the value of the inference accuracy by actual measurement, the explanatory variable value acquisition unit 23 may operate as follows, for example. The explanatory variable value acquisition unit 23 specifies an application pattern to the processing device 18. Then, the explanatory variable value acquisition unit 23 inputs the neural network stored in the discrimination model storage unit 21 to the processing device 18. Further, the explanatory variable value acquisition unit 23 inputs a plurality of data (assumed to be N) stored in the data storage unit 22 to the processing device 18, and sends the individual data to the processing device 18. Induce the inference result. That is, the explanatory variable value acquisition unit 23 causes the processing device 18 to execute the inference process N times. At this time, the processing device 18 executes the inference process by an operation according to the specified application pattern. As a result, N inference results are obtained. The explanatory variable value acquisition unit 23 compares the correct answer data stored in the data storage unit 22 with the respective inference results, and determines the ratio of the number of inference processes in which the correct answer data was obtained to the number of N inference processes. Calculate, and then calculate the reciprocal of the ratio. The reciprocal of the ratio corresponds to the value of the inference accuracy. The operation in which the explanatory variable value acquisition unit 23 acquires the value of the inference accuracy by actual measurement is not limited to the above example.
 説明変数値取得部23は、指定する適用パターンを順次、変更し、適用パターン毎に、実測によって、推論精度の値を取得する。 (4) The explanatory variable value acquisition unit 23 sequentially changes the application pattern to be specified, and acquires the value of the inference accuracy by actual measurement for each application pattern.
 次に、説明変数値取得部23がシミュレーションにより説明変数の値を取得する場合の動作について説明する。ここでは、図10に示すように、演算最適化装置が、設計情報記憶部19を備えている場合を例にして説明する。本例では、処理装置18内の低精度演算回路5(図3参照)に設けられる演算器(例えば、MAC)の数や、処理装置18内の高精度演算回路6(図3参照)に設けられる演算器(例えば、MAC)の数が、設計情報として設計情報記憶部19に記憶されているものとする。 Next, the operation when the explanatory variable value acquiring unit 23 acquires the value of the explanatory variable by simulation will be described. Here, a case will be described as an example where the operation optimization device includes a design information storage unit 19 as shown in FIG. In this example, the number of arithmetic units (for example, MAC) provided in the low-precision arithmetic circuit 5 (see FIG. 3) in the processing device 18 and the high-precision arithmetic circuit 6 (see FIG. 3) in the processing device 18 are provided. It is assumed that the number of arithmetic units (for example, MAC) to be used is stored in the design information storage unit 19 as design information.
 説明変数値取得部23が「処理速度」の値をシミュレーションによって取得する動作を説明する。本例では、説明変数値取得部23は、例えば、「処理速度」の値を求めるための関数(以下、処理速度関数と記す。)を予め保持する。処理速度関数は、予め定められている。処理速度関数は、例えば、低精度演算回路5に設けられる演算器の数、高精度演算回路6に設けられる演算器の数、低精度演算回路5が第1メモリ7にアクセスする場合のメモリアクセス量(メモリアクセス回数)、高精度演算回路6が第2メモリ8にアクセスする場合のメモリアクセス量(メモリアクセス回数)、および、低精度演算回路5と高精度演算回路6との間で授受されるデータ量(以下、データ授受量と記す場合がある。)を変数とする。以下、処理速度関数が、上記の各変数で表される場合を例にして説明する。ただし、処理速度関数で用いられる変数は、上記の例に限定されない。 The operation of the explanation variable value acquisition unit 23 acquiring the value of “processing speed” by simulation will be described. In this example, the explanatory variable value acquisition unit 23 holds, for example, a function (hereinafter, referred to as a processing speed function) for obtaining a value of “processing speed” in advance. The processing speed function is predetermined. The processing speed function includes, for example, the number of arithmetic units provided in the low-precision arithmetic circuit 5, the number of arithmetic units provided in the high-precision arithmetic circuit 6, and memory access when the low-precision arithmetic circuit 5 accesses the first memory 7. Amount (the number of memory accesses), the amount of memory access when the high-precision arithmetic circuit 6 accesses the second memory 8 (the number of memory accesses), and the amount of data transmitted and received between the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6. The amount of data to be transferred (hereinafter, sometimes referred to as the data transfer amount) is used as a variable. Hereinafter, a case where the processing speed function is represented by each of the above variables will be described as an example. However, the variables used in the processing speed function are not limited to the above example.
 なお、データ授受量は、例えば、授受されるデータの個数と、データ1個当たりのバイト数との積によって表される。この場合の単位は、例えば、バイトである。 The data transfer amount is represented, for example, by the product of the number of data to be transferred and the number of bytes per data. The unit in this case is, for example, bytes.
 説明変数値取得部23は、上記の各変数の値を処理速度関数に代入することによって、処理速度の値を計算すればよい。ここで、変数のうち、低精度演算回路5に設けられる演算器の数、高精度演算回路6に設けられる演算器の数は、設計情報で定められた値を用いればよい。低精度演算回路5が第1メモリ7にアクセスする場合のメモリアクセス量(メモリアクセス回数)、高精度演算回路6が第2メモリ8にアクセスする場合のメモリアクセス量(メモリアクセス回数)、および、低精度演算回路5と高精度演算回路6との間のデータ授受量に関しては、説明変数値取得部23が適用パターンを選択し、設計情報記憶部19に記憶された設計情報から定まる処理装置18の動作であって選択した適用パターンに応じた動作を模擬することによって、導出すればよい。説明変数値取得部23は、上記の演算器の数や、選択した適用パターンに基づいて導出したメモリアクセス量、低精度演算回路5と高精度演算回路6との間のデータ授受量を、処理速度関数に代入することによって、処理速度の値を計算すればよい。この結果、説明変数値取得部23は、シミュレーションに基づいて、処理速度の値を取得することができる。 The explanatory variable value acquisition unit 23 may calculate the value of the processing speed by substituting the value of each of the above variables into the processing speed function. Here, among the variables, the number of arithmetic units provided in the low-precision arithmetic circuit 5 and the number of arithmetic units provided in the high-precision arithmetic circuit 6 may use values determined by the design information. The amount of memory access (the number of memory accesses) when the low-precision arithmetic circuit 5 accesses the first memory 7, the amount of memory access (the number of memory accesses) when the high-precision arithmetic circuit 6 accesses the second memory 8, and Regarding the data transfer amount between the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6, the explanatory variable value acquisition unit 23 selects an applicable pattern, and the processing device 18 determined from the design information stored in the design information storage unit 19. The above operation may be derived by simulating the operation according to the selected application pattern. The explanatory variable value acquisition unit 23 processes the number of the arithmetic units, the memory access amount derived based on the selected applied pattern, and the data transfer amount between the low precision arithmetic circuit 5 and the high precision arithmetic circuit 6. The value of the processing speed may be calculated by substituting the value into the speed function. As a result, the explanatory variable value acquisition unit 23 can acquire the value of the processing speed based on the simulation.
 説明変数値取得部23は、選択する適用パターンを順次、変更し、適用パターン毎に、シミュレーションに基づく処理速度の値を計算する。 The explanatory variable value acquisition unit 23 sequentially changes the application pattern to be selected, and calculates a processing speed value based on a simulation for each application pattern.
 説明変数値取得部23が「推論精度」の値をシミュレーションによって取得する動作を説明する。推論精度の値をシミュレーションによって取得する場合、説明変数値取得部23は、例えば、以下のように動作すればよい。説明変数値取得部23は、適用パターンを選択する。そして、説明変数値取得部23は、データ記憶部22に記憶されている複数個(本例では、N個)のデータ毎に、設計情報から定まる処理装置18の動作であって選択した適用パターンに応じた動作を模擬することによって、データに対する推論結果を導出する。この結果、N個の推論結果が得られる。説明変数値取得部23は、推論結果の数(N個)に対する、正解データと一致する推論結果の数の割合を算出し、さらにその割合の逆数を算出する。その割合の逆数が、推論精度の値に該当する。なお、説明変数値取得部23が推論精度の値をシミュレーションによって取得する動作は、上記の例に限定されない。 The operation in which the explanatory variable value acquiring unit 23 acquires the value of “inference accuracy” by simulation will be described. When acquiring the value of the inference accuracy by simulation, the explanatory variable value acquiring unit 23 may operate as follows, for example. The explanatory variable value acquisition unit 23 selects an application pattern. Then, the explanatory variable value acquisition unit 23 performs the operation of the processing device 18 determined from the design information for each of a plurality of (N in this example) data stored in the data storage unit 22 and selects the selected application pattern. By simulating the operation according to, the inference result for the data is derived. As a result, N inference results are obtained. The explanatory variable value acquisition unit 23 calculates the ratio of the number of inference results matching the correct answer data to the number of inference results (N), and further calculates the reciprocal of the ratio. The reciprocal of the ratio corresponds to the value of the inference accuracy. The operation in which the explanatory variable value obtaining unit 23 obtains the value of the inference accuracy by simulation is not limited to the above example.
 説明変数値取得部23は、指定する適用パターンを順次、変更し、適用パターン毎に、シミュレーションによって、推論精度の値を取得する。 The explanatory variable value acquisition unit 23 sequentially changes the application pattern to be specified, and acquires the value of the inference accuracy by simulation for each application pattern.
 本発明では、説明変数値取得部23は、説明変数の値を、実測によって取得してもよく、あるいは、シミュレーションによって取得してもよい。いずれの場合であっても、説明変数値取得部23は、適用パターン毎に説明変数(本例では、「推論精度」および「処理速度」)の値を取得する。 In the present invention, the explanatory variable value acquiring unit 23 may acquire the value of the explanatory variable by actual measurement or by simulation. In any case, the explanatory variable value acquiring unit 23 acquires the values of the explanatory variables (in this example, “inference accuracy” and “processing speed”) for each application pattern.
 なお、上記の例のように、1つのデータに対する推論処理時間(換言すれば、1秒当たりに処理可能なデータ数の逆数)で処理速度を表わす場合、処理速度を示す値が小さい方が好ましい。同様に、N回の推論処理回数に対する、正解データが得られた推論処理回数の割合の逆数(換言すれば、推論結果の数(N個)に対する、正解データと一致する推論結果の数の割合の逆数)によって推論精度を表わす場合にも、推論精度を示す値が小さいほど好ましい。 When the processing speed is represented by the inference processing time for one data (in other words, the reciprocal of the number of data that can be processed per second) as in the above example, it is preferable that the value indicating the processing speed is smaller. . Similarly, the reciprocal of the ratio of the number of inference processes for which correct data was obtained to the number of N inference processes (in other words, the ratio of the number of inference results matching the correct data to the number of inference results (N)) In the case where the inference precision is expressed by the reciprocal of the above, it is preferable that the value indicating the inference precision is smaller.
 目的関数計算部25は、説明変数値取得部23が適用パターン毎に算出した説明変数(本例では、「推論精度」および「処理速度」)の値を、目的関数を表わす式(本例では、前述の式(3))に代入することによって、目的関数の値を計算する。目的関数計算部25は、目的関数の値を計算する処理を、適用パターン毎に行う。 The objective function calculation unit 25 calculates the value of the explanatory variable (in this example, “inference accuracy” and “processing speed”) calculated by the explanatory variable value acquisition unit 23 for each applied pattern into an expression (in this example, , The value of the objective function is calculated. The objective function calculator 25 performs a process of calculating the value of the objective function for each applied pattern.
 計算結果記憶部26は、適用パターン毎に計算された目的関数の値を記憶する記憶装置である。目的関数計算部25は、適用パターン毎に目的関数の値を計算し、適用パターン毎の目的関数の値を、計算結果記憶部26に記憶させる。 The calculation result storage unit 26 is a storage device that stores the value of the objective function calculated for each application pattern. The objective function calculation unit 25 calculates the value of the objective function for each application pattern, and stores the value of the objective function for each application pattern in the calculation result storage unit 26.
 前述のように、本例では、処理速度を示す値が小さい方が好ましく、同様に、推論精度を示す値が小さいほど好ましい。従って、式(3)に例示するように表される目的関数の値が小さいほど好ましい。従って、目的関数の値が最小となる適用パターンが最も好ましい適用パターン(すなわち、最適な適用パターン)であると言える。 As described above, in this example, it is preferable that the value indicating the processing speed is smaller, and similarly, the smaller the value indicating the inference accuracy, the more preferable. Therefore, it is preferable that the value of the objective function represented by the expression (3) is small. Therefore, it can be said that the application pattern with the minimum value of the objective function is the most preferable application pattern (that is, the optimal application pattern).
 適用パターン決定部27は、計算結果記憶部26に記憶された適用パターン毎の目的関数の値を参照し、目的関数の値が最小となる適用パターンを決定する。前述のように、目的関数の値が最小となる適用パターンは、最適な適用パターンである。 The application pattern determination unit 27 refers to the value of the objective function for each application pattern stored in the calculation result storage unit 26, and determines the application pattern that minimizes the value of the objective function. As described above, the application pattern that minimizes the value of the objective function is the optimal application pattern.
 ここで、適用パターンは、判別モデル(本実施形態では、ニューラルネットワーク)を用いた演算で、低精度演算回路5(図3参照)をニューラルネットワークのどの層に適用し、高精度演算回路6(図3参照)をニューラルネットワークのどの層に適用するのかを定めた情報である。従って、適用パターンが決定されることで、ニューラルネットワークを用いた演算を最適化することができる。そして、ニューラルネットワークの個々の層に、低精度演算回路5および高精度演算回路6のどちらを適用するのかが決定されるので、ニューラルネットワークの各層の演算精度を、第1の演算精度(例えば、低精度演算回路5による8ビットの整数演算)とするのか、第2の演算精度(例えば、高精度演算回路6による32ビットの浮動小数点演算)とするのかを決定することができる。 Here, the application pattern is an operation using a discriminant model (in the present embodiment, a neural network). The low-precision operation circuit 5 (see FIG. 3) is applied to any layer of the neural network, and the high-precision operation circuit 6 ( (See FIG. 3) is applied to which layer of the neural network. Therefore, the calculation using the neural network can be optimized by determining the application pattern. Then, since it is determined which of the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 is applied to each layer of the neural network, the arithmetic accuracy of each layer of the neural network is determined by the first arithmetic accuracy (for example, It is possible to determine whether to use an 8-bit integer operation by the low-precision operation circuit 5 or to use the second operation accuracy (for example, a 32-bit floating-point operation by the high-precision operation circuit 6).
 説明変数値取得部23、目的関数計算部25および適用パターン決定部27は、例えば、演算最適化プログラムに従って動作するコンピュータのCPU(Central Processing Unit )によって実現される。この場合、CPUが、プログラム記憶装置等のプログラム記録媒体から演算最適化プログラムを読み込む。そして、CPUは、その演算最適化プログラムに従って、説明変数値取得部23、目的関数計算部25および適用パターン決定部27として動作すればよい。 {The explanatory variable value acquisition unit 23, the objective function calculation unit 25, and the application pattern determination unit 27 are realized by, for example, a CPU (Central Processing Unit) of a computer that operates according to an operation optimization program. In this case, the CPU reads the operation optimization program from a program recording medium such as a program storage device. Then, the CPU may operate as the explanatory variable value acquisition unit 23, the objective function calculation unit 25, and the applied pattern determination unit 27 according to the operation optimization program.
 次に、本発明の実施形態の処理経過の例を説明する。図11は、本発明の実施形態の演算最適化装置の処理経過の例を示すフローチャートである。なお、ここでは、目的関数記憶部24が前述の式(3)で表される目的関数を記憶し、説明変数値取得部23が説明変数の値として、「推論精度」の値および「処理速度」の値を取得する場合を例にして説明する。また、既に説明した事項については、適宜、説明を省略する。 Next, an example of the processing progress of the embodiment of the present invention will be described. FIG. 11 is a flowchart illustrating an example of the processing progress of the operation optimization device according to the embodiment of this invention. Here, the objective function storage unit 24 stores the objective function represented by the above equation (3), and the explanatory variable value acquisition unit 23 uses the value of “inference accuracy” and the “processing speed” as the value of the explanatory variable. The following describes an example in which the value of “is acquired. In addition, description of the already described items will be appropriately omitted.
 まず、説明変数値取得部23は、予め記憶している複数の適用パターンの中から、未選択の適用パターンを1つ選択する(ステップS1)。 First, the explanatory variable value acquisition unit 23 selects one unselected application pattern from a plurality of application patterns stored in advance (step S1).
 次に、説明変数値取得部23は、ステップS1で選択した適用パターンのもとでの推論処理の動作における説明変数の値を取得する(ステップS2)。本例では、説明変数値取得部23は、ステップS1で選択した適用パターンのもとでの動作における、「推論精度」の値、および、「処理速度」の値をそれぞれ取得する。 Next, the explanatory variable value acquisition unit 23 acquires the value of the explanatory variable in the operation of the inference processing under the application pattern selected in step S1 (step S2). In this example, the explanatory variable value acquisition unit 23 acquires the value of “inference accuracy” and the value of “processing speed” in the operation under the application pattern selected in step S1.
 説明変数値取得部23は、実測によって説明変数の値を取得してもよく、あるいは、シミュレーションによって説明変数の値を取得してもよい。実測により「推論精度」の値や「処理速度」の値を取得する動作や、シミュレーションにより「推論精度」の値や「処理速度」の値を取得する動作については、既に説明したので、ここでは説明を省略する。 The explanatory variable value acquisition unit 23 may acquire the value of the explanatory variable by actual measurement, or may acquire the value of the explanatory variable by simulation. The operation of obtaining the value of "inference accuracy" and "processing speed" by actual measurement and the operation of obtaining the value of "inference accuracy" and "processing speed" by simulation have already been described. Description is omitted.
 ステップS2の後、目的関数計算部25は、選択された適用パターンに関してステップS2で取得された説明変数の値(本例では、「推論精度」の値、および、「処理速度」の値)を、目的関数を表わす式(本例では、前述の式(3))に代入することによって、目的関数の値を計算する(ステップS3)。そして、目的関数計算部25は、ステップS1で選択された適用パターンと、目的関数の値とを対応付けて、計算結果記憶部26に記憶させる。 After step S2, the objective function calculation unit 25 calculates the values of the explanatory variables (in this example, the values of “inference accuracy” and “processing speed”) acquired in step S2 for the selected application pattern. Then, the value of the objective function is calculated by substituting it into the expression representing the objective function (in this example, the above-mentioned expression (3)) (step S3). Then, the objective function calculation unit 25 associates the application pattern selected in step S <b> 1 with the value of the objective function and stores the association pattern in the calculation result storage unit 26.
 次に、説明変数値取得部23は、予め記憶している全ての適用パターンがステップS1で選択済みになっているか否かを判定する(ステップS4)。 Next, the explanatory variable value acquiring unit 23 determines whether or not all of the application patterns stored in advance have been selected in step S1 (step S4).
 未選択の適用パターンが存在する場合には(ステップS4のNo)、演算最適化装置は、ステップS1以降の処理を繰り返す。 If there is an unselected application pattern (No in step S4), the operation optimization device repeats the processing in step S1 and subsequent steps.
 全ての適用パターンが選択済みとなっている場合には(ステップS4のYes)、適用パターン決定部27は、計算結果記憶部26に記憶された適用パターン毎の目的関数の値を参照し、目的関数の値が最小となる適用パターンを決定する(ステップS5)。ステップS5で処理を終了する。 If all the applied patterns have been selected (Yes in step S4), the applied pattern determination unit 27 refers to the value of the objective function for each applied pattern stored in the calculation result storage unit 26, and An application pattern that minimizes the function value is determined (step S5). The process ends in step S5.
 既に説明したように、適用パターンが決定されることで、ニューラルネットワークを用いた演算を最適化することができる。そして、ニューラルネットワークの個々の層に、低精度演算回路5および高精度演算回路6のどちらを適用するのかが決定されるので、ニューラルネットワークの各層の演算精度を、第1の演算精度(例えば、低精度演算回路5による8ビットの整数演算)とするのか、第2の演算精度(例えば、高精度演算回路6による32ビットの浮動小数点演算)とするのかを決定することができる。 As described above, the calculation using the neural network can be optimized by determining the application pattern. Then, since it is determined which of the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6 is applied to each layer of the neural network, the arithmetic accuracy of each layer of the neural network is determined by the first arithmetic accuracy (for example, It is possible to determine whether to use an 8-bit integer operation by the low-precision operation circuit 5 or to use the second operation accuracy (for example, a 32-bit floating-point operation by the high-precision operation circuit 6).
 また、本実施形態では、上記のステップS1~S5の処理によって、適用パターンを決定するので、自動的に適用パターンを決定することができる。従って、ニューラルネットワークの各層の演算精度を、第1の演算精度とするのか、第2の演算精度とするのかを自動的に決定することができる。 In addition, in the present embodiment, since the applied pattern is determined by the processing of steps S1 to S5, the applied pattern can be automatically determined. Therefore, it is possible to automatically determine whether the calculation accuracy of each layer of the neural network is the first calculation accuracy or the second calculation accuracy.
 次に、本発明の実施形態の変形例として、目的関数を、「推論精度」および「処理速度」に加えさらに他の説明変数によって表した場合を説明する。なお、以下に示す変形例の説明では、既に説明した事項については、適宜、説明を省略する。 Next, as a modified example of the embodiment of the present invention, a case where the objective function is represented by another explanatory variable in addition to “inference accuracy” and “processing speed” will be described. In the following description of the modified example, the description of the items already described is appropriately omitted.
 目的関数は、「推論精度」および「処理速度」に加えて、さらに、「低精度演算回路5と高精度演算回路6との間で授受されるデータ量」も説明変数として、表されてもよい。以下、「低精度演算回路5と高精度演算回路6との間で授受されるデータ量」を、単に、データ授受量と記す。既に説明したように、データ授受量は、例えば、授受されるデータの個数と、データ1個当たりのバイト数との積によって表される。 In the objective function, in addition to “inference accuracy” and “processing speed”, “the amount of data transmitted and received between the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6” may also be expressed as an explanatory variable. Good. Hereinafter, “the amount of data transmitted and received between the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6” is simply referred to as the data exchange amount. As described above, the data transfer amount is represented, for example, by the product of the number of data transferred and the number of bytes per data.
 本例では、目的関数記憶部24は、目的関数として、例えば、以下の式(4)で表される関数を記憶すればよい。 In this example, the objective function storage unit 24 may store, for example, a function represented by the following equation (4) as the objective function.
 目的関数=「推論精度」×α+「処理速度」×β+「データ授受量」×γ
                             ・・・(4)
Objective function = "inference accuracy" x α + "processing speed" x β + "data transfer amount" x γ
... (4)
 γは、「データ授受量」の係数であり、予め決定されている。本例では、γが正の値として定められている場合を例にして説明する。 Γ is a coefficient of “data transfer amount” and is determined in advance. In this example, a case where γ is defined as a positive value will be described as an example.
 本変形例では、説明変数値取得部23は、「推論精度」および「処理速度」の他に、「データ授受量」の値も適用パターン毎に取得する。 In this modification, the explanatory variable value acquisition unit 23 acquires the value of “data transfer amount” in addition to the “inference accuracy” and “processing speed” for each application pattern.
 説明変数値取得部23が「データ授受量」の値を実測によって取得する動作を説明する。説明変数値取得部23は、処理装置18に対して適用パターンを指定する。そして、説明変数値取得部23は、判別モデル記憶部21に記憶されているニューラルネットワークと、データ記憶部22に記憶されているデータとを、処理装置18に入力し、処理装置18に推論処理を実行させ、処理装置18がそのデータに対する推論処理を行う際のデータ授受量を計測すればよい、この結果、説明変数値取得部23は、データ授受量の値を取得する。また、このとき、処理装置18は、指定された適用パターンに応じた動作で、推論処理を実行する。なお、説明変数値取得部23は、1つのデータに関して、処理装置18に推論処理を実行させることで、データ授受量の値を取得することができる。 The operation in which the explanatory variable value acquiring unit 23 acquires the value of “data transfer amount” by actual measurement will be described. The explanatory variable value acquisition unit 23 specifies an application pattern to the processing device 18. The explanatory variable value acquisition unit 23 inputs the neural network stored in the discrimination model storage unit 21 and the data stored in the data storage unit 22 to the processing device 18, and instructs the processing device 18 to perform inference processing. May be executed, and the data transfer amount when the processing device 18 performs the inference process on the data may be measured. As a result, the explanatory variable value obtaining unit 23 obtains the value of the data transfer amount. Further, at this time, the processing device 18 performs the inference process by an operation according to the specified application pattern. Note that the explanatory variable value acquisition unit 23 can acquire the value of the data transfer amount by causing the processing device 18 to execute the inference process for one piece of data.
 説明変数値取得部23は、指定する適用パターンを順次、変更し、適用パターン毎に、実測によってデータ授受量の値を取得する。 The explanatory variable value acquisition unit 23 sequentially changes the application pattern to be specified, and acquires the value of the data transfer amount by actual measurement for each application pattern.
 説明変数値取得部23が「データ授受量」の値をシミュレーションによって取得する動作を説明する。説明変数値取得部23は、適用パターンを選択し、設計情報記憶部19に記憶された設計情報から定まる処理装置18の動作であって選択した適用パターンに応じた動作を模擬することによって、データ授受量の値を導出すればよい。なお、説明変数値取得部23は、1つのデータに関して、処理装置18の動作を模擬することで、データ授受量の値を導出することができる。 The operation in which the explanatory variable value acquiring unit 23 acquires the value of “data transfer amount” by simulation will be described. The explanatory variable value acquisition unit 23 selects an application pattern and simulates the operation of the processing device 18 determined from the design information stored in the design information storage unit 19, which corresponds to the selected application pattern. What is necessary is just to derive the value of the transfer amount. The explanatory variable value acquisition unit 23 can derive the value of the data transfer amount by simulating the operation of the processing device 18 for one piece of data.
 説明変数値取得部23は、選択する適用パターンを順次、変更し、適用パターン毎に、シミュレーションによってデータ授受量の値を導出する。 (4) The explanatory variable value acquisition unit 23 sequentially changes the application pattern to be selected, and derives the value of the data transfer amount by simulation for each application pattern.
 本変形例では、目的関数計算部25は、「推論精度」の値、「処理速度」の値、および、「データ授受量」の値を式(4)に代入することによって、適用パターン毎に目的関数の値を計算すればよい。 In this modified example, the objective function calculation unit 25 substitutes the value of “inference accuracy”, the value of “processing speed”, and the value of “data transfer amount” into Expression (4), so that What is necessary is just to calculate the value of the objective function.
 その他の点に関しては、上記の実施形態と同様である。 Other points are the same as in the above embodiment.
 本変形例によれば、「データ授受量」も加味して、ニューラルネットワークの各層の演算精度を、第1の演算精度とするのか、第2の演算精度とするのかを決定することができる。 According to the present modification, it is possible to determine whether the calculation accuracy of each layer of the neural network is the first calculation accuracy or the second calculation accuracy in consideration of the “data transfer amount”.
 また、目的関数は、「推論精度」および「処理速度」に加えて、さらに、「処理装置18の回路規模(以下、単に回路規模と記す。)」を説明変数として、表されてもよい。 The objective function may be expressed using “the circuit scale of the processing device 18 (hereinafter simply referred to as a circuit scale)” as an explanatory variable in addition to “inference accuracy” and “processing speed”.
 本例では、目的関数記憶部24は、目的関数として、例えば、以下の式(5)で表される関数を記憶すればよい。 In this example, the objective function storage unit 24 may store, for example, a function represented by the following equation (5) as the objective function.
 目的関数=「推論精度」×α+「処理速度」×β+「回路規模」×δ
                           ・・・(5)
Objective function = "inference accuracy" x α + "processing speed" x β + "circuit scale" x δ
... (5)
 δは、「回路規模」の係数であり、予め決定されている。本例では、δが正の値として定められている場合を例にして説明する。 Δ is a coefficient of “circuit scale” and is determined in advance. In this example, a case where δ is defined as a positive value will be described as an example.
 以下の説明では、低精度演算回路5に含まれる演算器(例えば、MAC)、および、高精度演算回路6に含まれる演算器(例えば、MAC)の個数を、低精度演算回路5に含まれる演算器、または、高精度演算回路6に含まれる演算器を基準として表した値を、「回路規模」とする場合を例にして説明する。本例では、低精度演算回路5に含まれる演算器を基準とするものとして説明する。低精度演算回路5に含まれる演算器を基準とする場合、高精度演算回路6に含まれる演算器の個数を、低精度演算回路5に含まれる演算器の何個分に相当するかという値に変換して表わす。また、高精度演算回路6に含まれる1個の演算器が、低精度演算回路5に含まれる演算器何個分に相当するかは、高精度演算回路6に含まれる1個の演算器の占有面積が、低精度演算回路5に含まれる演算器何個分の占有面積に相当するかによって求めればよい。以下、説明を簡単にするために、高精度演算回路6に含まれる1個の演算器が、低精度演算回路5に含まれる演算器J個分に相当するものとして説明する。 In the following description, the number of arithmetic units (eg, MAC) included in the low-precision arithmetic circuit 5 and the number of arithmetic units (eg, MAC) included in the high-precision arithmetic circuit 6 are included in the low-precision arithmetic circuit 5. An example will be described in which a value expressed on the basis of an arithmetic unit or an arithmetic unit included in the high-precision arithmetic circuit 6 is referred to as “circuit scale”. In this example, a description will be given assuming that the arithmetic unit included in the low-precision arithmetic circuit 5 is used as a reference. When the arithmetic units included in the low-precision arithmetic circuit 5 are used as a reference, the number of the arithmetic units included in the high-precision arithmetic circuit 6 corresponds to the number of the arithmetic units included in the low-precision arithmetic circuit 5. Convert to and represent. The number of the arithmetic units included in the high-precision arithmetic circuit 6 corresponds to the number of the arithmetic units included in the low-precision arithmetic circuit 6. What is necessary is just to obtain | require the occupation area according to how many occupation units included in the low precision arithmetic circuit 5 correspond. Hereinafter, for the sake of simplicity, a description will be given assuming that one arithmetic unit included in the high-precision arithmetic circuit 6 corresponds to J arithmetic units included in the low-precision arithmetic circuit 5.
 本変形例では、説明変数値取得部23は、「推論精度」および「処理速度」の他に、「回路規模」の値も取得する。 In the present modification, the explanatory variable value acquisition unit 23 also acquires a value of “circuit scale” in addition to “inference accuracy” and “processing speed”.
 説明変数値取得部23が「回路規模」の値を実測によって取得する動作を説明する。処理装置18が存在する場合には、その処理装置18内の低精度演算回路5に含まれる演算器の個数、高精度演算回路6に含まれる演算器の個数、および、高精度演算回路6に含まれる1個の演算器が、低精度演算回路5に含まれる演算器何個分に相当するかという情報は、既知の情報である。説明変数値取得部23は、例えば、この既知の情報を、予め記憶しているものとする。また、説明を簡単にするために、高精度演算回路6に含まれる1個の演算器が、低精度演算回路5に含まれる演算器J個分に相当するものとして説明する。 The operation of the explanatory variable value acquiring unit 23 acquiring the value of “circuit scale” by actual measurement will be described. When the processing device 18 is present, the number of arithmetic units included in the low-precision arithmetic circuit 5 in the processing device 18, the number of arithmetic units included in the high-precision arithmetic circuit 6, and The information as to how many arithmetic units included in the low-precision arithmetic circuit 5 corresponds to one arithmetic unit included therein is known information. It is assumed that the explanatory variable value acquisition unit 23 stores this known information in advance, for example. In addition, for simplicity, the description will be made on the assumption that one arithmetic unit included in the high-precision arithmetic circuit 6 corresponds to J arithmetic units included in the low-precision arithmetic circuit 5.
 この場合、説明変数値取得部23は、以下に示す式(6)の計算によって、「回路規模」の値を計算すればよい。 In this case, the explanatory variable value acquiring unit 23 may calculate the value of “circuit scale” by calculating the following equation (6).
 回路規模=「低精度演算回路5に含まれる演算器の個数」+
      「高精度演算回路6に含まれる演算器の個数」×J
                        ・・・(6)
Circuit size = “the number of arithmetic units included in the low-precision arithmetic circuit 5” +
"Number of arithmetic units included in high-precision arithmetic circuit 6" x J
... (6)
 なお、上記の例では、回路規模の値は、適用パターンに依存しないので、説明変数値取得部23は、回路規模の値を、各適用パターンで共通の値として算出してよい。 In the above example, since the value of the circuit scale does not depend on the application pattern, the explanatory variable value acquisition unit 23 may calculate the value of the circuit scale as a common value for each application pattern.
 説明変数値取得部23が「回路規模」の値をシミュレーションによって取得する動作を説明する。この場合、設計情報記憶部19(図10参照)が記憶する設計情報に、低精度演算回路5に含まれる演算器の個数の設計値、高精度演算回路6に含まれる演算器の個数の設計値、および、高精度演算回路6に含まれる1個の演算器が、低精度演算回路5に含まれる演算器何個分に相当するかという設計値を含めておけばよい。本例においても、高精度演算回路6に含まれる1個の演算器が、低精度演算回路5に含まれる演算器J個分に相当するものとして説明する。 The operation in which the explanatory variable value acquiring unit 23 acquires the value of “circuit scale” by simulation will be described. In this case, the design information stored in the design information storage unit 19 (see FIG. 10) includes a design value of the number of arithmetic units included in the low-precision arithmetic circuit 5 and a design value of the number of arithmetic units included in the high-precision arithmetic circuit 6. What is necessary is just to include a value and a design value of how many arithmetic units included in the low-precision arithmetic circuit 5 correspond to one arithmetic unit included in the high-precision arithmetic circuit 6. Also in this example, one arithmetic unit included in the high-precision arithmetic circuit 6 will be described as equivalent to J arithmetic units included in the low-precision arithmetic circuit 5.
 この場合、説明変数値取得部23は、以下に示す式(7)の計算によって、「回路規模」の値を計算すればよい。 In this case, the explanatory variable value acquisition unit 23 may calculate the value of “circuit scale” by calculating the following equation (7).
 回路規模=「低精度演算回路5に含まれる演算器の個数の設計値」+
      「高精度演算回路6に含まれる演算器の個数の設計値」×J
                            ・・・(7)
Circuit scale = “design value of the number of arithmetic units included in low-precision arithmetic circuit 5” +
"Design value of the number of arithmetic units included in high-precision arithmetic circuit 6" x J
... (7)
 なお、上記の例では、回路規模の値は、適用パターンに依存しないので、説明変数値取得部23は、回路規模の値を、各適用パターンで共通の値として算出してよい。 In the above example, since the value of the circuit scale does not depend on the application pattern, the explanatory variable value acquisition unit 23 may calculate the value of the circuit scale as a common value for each application pattern.
 また、シミュレーションによって「回路規模」の値を取得する場合、説明変数値取得部23は、演算器の個数を低精度演算回路5に含まれる演算器等を基準として表した値とは異なる値で求めてもよい。例えば、説明変数値取得部23は、「回路規模」の値を求めるための関数(以下、回路規模関数と記す。)によって、回路規模の値を計算してもよい。この場合、説明変数値取得部23は、回路規模関数を予め保持する。また、回路規模関数は、予め定められている。回路規模関数は、例えば、低精度演算回路5に設けられる演算器の数、高精度演算回路6に設けられる演算器の数、低精度演算回路5がアクセスする第1メモリ7(図3参照)のメモリサイズ、高精度演算回路6がアクセスする第2メモリ8(図3参照)のメモリサイズ、および、データ授受量(低精度演算回路5と高精度演算回路6との間で授受されるデータ量)を変数とする。以下、回路規模関数が、上記の各変数で表される場合を例にして説明する。ただし、回路規模関数で用いられる変数は、上記の例に限定されない。第1メモリ7のメモリサイズ、および、第2メモリ8のメモリサイズは、設計情報として設計情報記憶部19に記憶させておけばよい。 When the value of “circuit scale” is obtained by simulation, the explanatory variable value obtaining unit 23 uses a value different from the value that represents the number of arithmetic units based on the arithmetic units and the like included in the low-precision arithmetic circuit 5. You may ask. For example, the explanatory variable value acquisition unit 23 may calculate the value of the circuit scale by using a function for calculating the value of the “circuit scale” (hereinafter, referred to as a circuit scale function). In this case, the explanatory variable value acquisition unit 23 holds the circuit scale function in advance. The circuit scale function is determined in advance. The circuit scale function includes, for example, the number of arithmetic units provided in the low-precision arithmetic circuit 5, the number of arithmetic units provided in the high-precision arithmetic circuit 6, and the first memory 7 accessed by the low-precision arithmetic circuit 5 (see FIG. 3). , The memory size of the second memory 8 (see FIG. 3) accessed by the high-precision arithmetic circuit 6, and the data transfer amount (the data transmitted and received between the low-precision arithmetic circuit 5 and the high-precision arithmetic circuit 6). Is a variable. Hereinafter, a case where the circuit scale function is represented by each of the above variables will be described as an example. However, the variables used in the circuit scale function are not limited to the above example. The memory size of the first memory 7 and the memory size of the second memory 8 may be stored in the design information storage unit 19 as design information.
 説明変数値取得部23は、上記の各変数の値を回路規模関数に代入することによって、回路規模の値を計算すればよい。ここで、変数のうち、低精度演算回路5に設けられる演算器の数、高精度演算回路6に設けられる演算器の数、第1メモリ7のメモリサイズ、および、第2メモリ8のメモリサイズは、設計情報で定められた値を用いればよい。データ授受量に関しては、説明変数値取得部23が適用パターンを選択し、設計情報記憶部19に記憶された設計情報から定まる処理装置18の動作であって選択した適用パターンに応じた動作を模擬することによって、導出すればよい。説明変数値取得部23は、上記の演算器の数やメモリサイズ、および、選択した適用パターンに基づいて導出したデータ授受量を回路規模関数に代入することによって、回路規模の値を計算すればよい。また、この場合、説明変数値取得部23は、選択する適用パターンを順次、変更し、適用パターン毎に、シミュレーションに基づく回路規模の値を計算する。 (4) The explanatory variable value acquisition unit 23 may calculate the value of the circuit scale by substituting the values of the above variables into the circuit scale function. Here, among the variables, the number of arithmetic units provided in the low-precision arithmetic circuit 5, the number of arithmetic units provided in the high-precision arithmetic circuit 6, the memory size of the first memory 7, and the memory size of the second memory 8 May use a value determined in the design information. Regarding the data transfer amount, the explanatory variable value acquisition unit 23 selects an application pattern, and simulates the operation of the processing device 18 determined from the design information stored in the design information storage unit 19, which corresponds to the selected application pattern. Then, it can be derived. The explanatory variable value acquisition unit 23 calculates the value of the circuit scale by substituting the number of arithmetic units, the memory size, and the data transfer amount derived based on the selected application pattern into a circuit scale function. Good. In this case, the explanatory variable value acquisition unit 23 sequentially changes the application pattern to be selected, and calculates a circuit scale value based on a simulation for each application pattern.
 本変形例では、目的関数計算部25は、「推論精度」の値、「処理速度」の値、および、「回路規模」の値を式(5)に代入することによって、適用パターン毎に目的関数の値を計算すればよい。 In this modified example, the objective function calculation unit 25 substitutes the value of “inference accuracy”, the value of “processing speed”, and the value of “circuit scale” into Expression (5) to obtain the objective for each application pattern. Just calculate the value of the function.
 その他の点に関しては、上記の実施形態と同様である。 Other points are the same as in the above embodiment.
 本変形例によれば、「回路規模」も加味して、ニューラルネットワークの各層の演算精度を、第1の演算精度とするのか、第2の演算精度とするのかを決定することができる。 According to the present modification, it is possible to determine whether the calculation accuracy of each layer of the neural network is the first calculation accuracy or the second calculation accuracy in consideration of the “circuit scale”.
 また、目的関数は、「推論精度」および「処理速度」に加えて、さらに、「処理装置18の消費電力(以下、単に消費電力と記す。)」を説明変数として、表されてもよい。 The objective function may be expressed using “power consumption of the processing device 18 (hereinafter simply referred to as power consumption)” as an explanatory variable in addition to “inference accuracy” and “processing speed”.
 本例では、目的関数記憶部24は、目的関数として、例えば、以下の式(8)で表される関数を記憶すればよい。 In this example, the objective function storage unit 24 may store, for example, a function represented by the following equation (8) as the objective function.
 目的関数=「推論精度」×α+「処理速度」×β+「消費電力」×ε
                             ・・・(8)
Objective function = "inference accuracy" x α + "processing speed" x β + "power consumption" x ε
... (8)
 εは、「消費電力」の係数であり、予め決定されている。本例では、εが正の値として定められている場合を例にして説明する。 Ε is a coefficient of “power consumption” and is determined in advance. In this example, a case where ε is defined as a positive value will be described as an example.
  本変形例では、説明変数値取得部23は、「推論精度」および「処理速度」の他に、「消費電力」の値も適用パターン毎に取得する。 In this modification, the explanatory variable value acquisition unit 23 acquires the value of “power consumption” in addition to “inference accuracy” and “processing speed” for each application pattern.
 説明変数値取得部23が「消費電力」の値を実測によって取得する動作を説明する。説明変数値取得部23は、処理装置18に対して適用パターンを指定する。そして、説明変数値取得部23は、判別モデル記憶部21に記憶されているニューラルネットワークと、データ記憶部22に記憶されているデータとを、処理装置18に入力し、処理装置18に推論処理を実行させ、処理装置18がそのデータに対する推論処理を行う際の消費電力を計測すればよい。この結果、説明変数値取得部23は、消費電力の値を取得する。また、このとき、処理装置18は、指定された適用パターンに応じた動作で、推論処理を実行する。なお、説明変数値取得部23は、1つのデータに関して、処理装置18に推論処理を実行させることで、消費電力の値を取得することができる。 The operation of the explanatory variable value acquiring unit 23 acquiring the value of “power consumption” by actual measurement will be described. The explanatory variable value acquisition unit 23 specifies an application pattern to the processing device 18. The explanatory variable value acquisition unit 23 inputs the neural network stored in the discrimination model storage unit 21 and the data stored in the data storage unit 22 to the processing device 18, and instructs the processing device 18 to perform inference processing. May be executed, and the power consumption when the processing device 18 performs the inference process on the data may be measured. As a result, the explanatory variable value acquisition unit 23 acquires the value of the power consumption. Further, at this time, the processing device 18 performs the inference process by an operation according to the specified application pattern. Note that the explanatory variable value acquisition unit 23 can acquire the value of the power consumption by causing the processing device 18 to execute the inference process for one piece of data.
 説明変数値取得部23は、指定する適用パターンを順次、変更し、適用パターン毎に、実測によって消費電力の値を取得する。 The explanatory variable value acquisition unit 23 sequentially changes the application pattern to be specified, and acquires the value of power consumption by actual measurement for each application pattern.
 説明変数値取得部23が「消費電力」の値をシミュレーションによって取得する動作を説明する。「消費電力」の値をシミュレーションによって導出する場合、設計段階で定められている、消費電力値導出に必要なデータを、設計情報記憶部19に記憶される設計情報に含めておく。説明変数値取得部23は、適用パターンを選択し、設計情報記憶部19に記憶された設計情報から定まる処理装置18の動作であって選択した適用パターンに応じた動作を模擬することによって、消費電力の値を導出すればよい。なお、説明変数値取得部23は、1つのデータに関して、処理装置18の動作を模擬することで、消費電力の値を導出することができる。 The operation in which the explanatory variable value acquiring unit 23 acquires the value of “power consumption” by simulation will be described. When the value of “power consumption” is derived by simulation, data necessary for deriving the power consumption value determined at the design stage is included in the design information stored in the design information storage unit 19. The explanatory variable value acquisition unit 23 selects an application pattern, and simulates an operation of the processing device 18 determined from the design information stored in the design information storage unit 19, the operation corresponding to the selected application pattern. What is necessary is just to derive the value of electric power. Note that the explanatory variable value acquisition unit 23 can derive the value of power consumption by simulating the operation of the processing device 18 for one piece of data.
 説明変数値取得部23は、選択する適用パターンを順次、変更し、適用パターン毎に、シミュレーションによって消費電力の値を導出する。 The explanatory variable value acquisition unit 23 sequentially changes the application pattern to be selected, and derives the value of power consumption by simulation for each application pattern.
 本変形例では、目的関数計算部25は、「推論精度」の値、「処理速度」の値、および、「消費電力」の値を式(8)に代入することによって、適用パターン毎に目的関数の値を計算すればよい。 In this modified example, the objective function calculation unit 25 substitutes the value of “inference accuracy”, the value of “processing speed”, and the value of “power consumption” into Expression (8) to obtain a target for each application pattern. Just calculate the value of the function.
 その他の点に関しては、上記の実施形態と同様である。 Other points are the same as in the above embodiment.
 本変形例によれば、「消費電力」も加味して、ニューラルネットワークの各層の演算精度を、第1の演算精度とするのか、第2の演算精度とするのかを決定することができる。 According to the present modification, it is possible to determine whether the calculation accuracy of each layer of the neural network is the first calculation accuracy or the second calculation accuracy in consideration of “power consumption”.
 上記の各変形例では、目的関数が、「推論精度」および「処理速度」に加えて、さらに、「データ授受量」、「回路規模」および「消費電力」のいずれかを説明変数として表される場合を説明した。目的関数は、「推論精度」および「処理速度」に加えて、さらに、「データ授受量」、「回路規模」および「消費電力」のうちの任意の1つ以上の説明変数によって表されていてもよい。 In each of the above modified examples, the objective function is represented by any one of “data transfer amount”, “circuit scale”, and “power consumption” as an explanatory variable in addition to “inference accuracy” and “processing speed”. Has been described. The objective function is represented by any one or more explanatory variables of “data transfer amount”, “circuit size”, and “power consumption” in addition to “inference accuracy” and “processing speed”. Is also good.
 目的関数が、「推論精度」、「処理速度」、「データ授受量」、「回路規模」および「消費電力」を説明変数として表されていてもよい。この場合、目的関数記憶部24は、目的関数として、例えば、以下の式(9)で表される関数を記憶すればよい。 (5) The objective function may be expressed with “inference accuracy”, “processing speed”, “data transfer amount”, “circuit size”, and “power consumption” as explanatory variables. In this case, the objective function storage unit 24 may store, for example, a function represented by the following equation (9) as the objective function.
 目的関数=「推論精度」×α+「処理速度」×β+「データ授受量」×γ
     +「回路規模」×δ+「消費電力」×ε
                            ・・・(9)
Objective function = "inference accuracy" x α + "processing speed" x β + "data transfer amount" x γ
+ “Circuit scale” x δ + “Power consumption” x ε
... (9)
 この場合、説明変数値取得部23は、実測により、または、シミュレーションにより、各説明変数(「推論精度」、「処理速度」、「データ授受量」、「回路規模」および「消費電力」)の値を、適用パターン毎に取得すればよい。 In this case, the explanatory variable value acquisition unit 23 obtains each explanatory variable (“inference accuracy”, “processing speed”, “data transfer amount”, “circuit scale”, and “power consumption”) by actual measurement or by simulation. The value may be obtained for each application pattern.
 また、目的関数計算部25は、説明変数値取得部23によって取得された各説明変数の値を式(9)に代入することによって、適用パターン毎に目的関数の値を計算すればよい。 (4) The objective function calculating unit 25 may calculate the value of the objective function for each application pattern by substituting the value of each explanatory variable acquired by the explanatory variable value acquiring unit 23 into Expression (9).
 この場合、「データ授受量」、「回路規模」および「消費電力」も加味して、ニューラルネットワークの各層の演算精度を、第1の演算精度とするのか、第2の演算精度とするのかを決定することができる。 In this case, in consideration of the “data transfer amount”, the “circuit scale”, and the “power consumption”, it is determined whether the calculation accuracy of each layer of the neural network is the first calculation accuracy or the second calculation accuracy. Can be determined.
 なお、式(9)において、「データ授受量」×γの項が含まれていなくてもよい。この場合、説明変数値取得部23は、「データ授受量」の値を取得しなくてよい。 In equation (9), the term “data transfer amount” × γ may not be included. In this case, the explanatory variable value acquisition unit 23 does not need to acquire the value of “data transfer amount”.
 また、式(9)において、「回路規模」×δの項が含まれていなくてもよい。この場合、説明変数値取得部23は、「回路規模」の値を取得しなくてよい。 Also, in equation (9), the term “circuit scale” × δ may not be included. In this case, the explanatory variable value acquisition unit 23 does not need to acquire the value of “circuit scale”.
 また、式(9)において、「消費電力」×εの項が設けられていなくてもよい。この場合、説明変数値取得部23は、「消費電力」の値を取得しなくてよい。 項 Also, in equation (9), the term “power consumption” × ε may not be provided. In this case, the explanatory variable value acquisition unit 23 does not need to acquire the value of “power consumption”.
 図12は、本発明の実施形態またはその変形例に係るコンピュータの構成例を示す概略ブロック図である。コンピュータ1000は、CPU1001と、主記憶装置1002と、補助記憶装置1003と、インタフェース1004とを備える。 FIG. 12 is a schematic block diagram showing a configuration example of a computer according to the embodiment of the present invention or its modification. The computer 1000 includes a CPU 1001, a main storage device 1002, an auxiliary storage device 1003, and an interface 1004.
 本発明の演算最適化装置は、コンピュータ1000に実装される。演算最適化装置の動作は、演算最適化プログラムの形式で補助記憶装置1003に記憶されている。CPU1001は、その演算最適化プログラムを補助記憶装置1003から読み出して主記憶装置1002に展開し、その演算最適化プログラムに従って、上記の実施形態やその変形例で説明した処理を実行する。 The operation optimization device of the present invention is implemented in the computer 1000. The operation of the operation optimization device is stored in the auxiliary storage device 1003 in the form of an operation optimization program. The CPU 1001 reads out the operation optimization program from the auxiliary storage device 1003, expands it in the main storage device 1002, and executes the processing described in the above embodiment and its modifications according to the operation optimization program.
 補助記憶装置1003は、一時的でない有形の媒体の例である。一時的でない有形の媒体の他の例として、インタフェース1004を介して接続される磁気ディスク、光磁気ディスク、CD-ROM(Compact Disk Read Only Memory )、DVD-ROM(Digital Versatile Disk Read Only Memory )、半導体メモリ等が挙げられる。また、プログラムが通信回線によってコンピュータ1000に配信される場合、配信を受けたコンピュータ1000がそのプログラムを主記憶装置1002に展開し、上記の処理を実行してもよい。 The auxiliary storage device 1003 is an example of a non-transitory tangible medium. Other examples of non-transitory tangible media include a magnetic disk, a magneto-optical disk, a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versatile Disk Read Only Memory) connected via the interface 1004, A semiconductor memory and the like are included. When the program is distributed to the computer 1000 via a communication line, the computer 1000 that has received the program may load the program into the main storage device 1002 and execute the above-described processing.
 また、プログラムは、前述の処理の一部を実現するためのものであってもよい。さらに、プログラムは、補助記憶装置1003に既に記憶されている他のプログラムとの組み合わせで前述の処理を実現する差分プログラムであってもよい。 (4) The program may be for realizing a part of the above-described processing. Furthermore, the program may be a difference program that implements the above-described processing in combination with another program already stored in the auxiliary storage device 1003.
 また、各構成要素の一部または全部は、汎用または専用の回路(circuitry )、プロセッサ等やこれらの組み合わせによって実現されてもよい。これらは、単一のチップによって構成されてもよいし、バスを介して接続される複数のチップによって構成されてもよい。各構成要素の一部または全部は、上述した回路等とプログラムとの組み合わせによって実現されてもよい。 {Some or all of the components may be realized by a general-purpose or dedicated circuit (processor), a processor, or a combination thereof. These may be configured by a single chip, or may be configured by a plurality of chips connected via a bus. Some or all of the components may be realized by a combination of the above-described circuit and the like and a program.
 各構成要素の一部または全部が複数の情報処理装置や回路等により実現される場合には、複数の情報処理装置や回路等は集中配置されてもよいし、分散配置されてもよい。例えば、情報処理装置や回路等は、クライアントアンドサーバシステム、クラウドコンピューティングシステム等、各々が通信ネットワークを介して接続される形態として実現されてもよい。 When a part or all of each component is realized by a plurality of information processing devices, circuits, and the like, the plurality of information processing devices, circuits, and the like may be centrally arranged or may be distributed. For example, the information processing device, the circuit, and the like may be realized as a form in which each is connected via a communication network, such as a client and server system or a cloud computing system.
 次に、本発明の概要について説明する。図13は、本発明の演算最適化装置の概要を示すブロック図である。本発明の演算最適化装置は、説明変数値取得手段73と、目的関数計算手段75と、適用パターン決定手段77とを備える。 Next, the outline of the present invention will be described. FIG. 13 is a block diagram showing an outline of the operation optimization device of the present invention. The arithmetic optimization device of the present invention includes an explanatory variable value acquisition unit 73, an objective function calculation unit 75, and an applied pattern determination unit 77.
 説明変数値取得手段73(例えば、説明変数値取得部23)は、1つ以上のユニットでそれぞれ構成された複数の層が結合された判別モデル(例えば、ニューラルネットワーク)を用いた演算で、第1の演算精度で演算を行う第1の演算回路(例えば、低精度演算回路5)をどの層に適用し、第1の演算精度よりも高い第2の演算精度で演算を行う第2の演算回路(例えば、高精度演算回路6)をどの層に適用するかを定めた情報である適用パターン毎に、所定の説明変数の値を取得する。 The explanatory variable value acquiring unit 73 (for example, the explanatory variable value acquiring unit 23) performs an operation using a discrimination model (for example, a neural network) in which a plurality of layers each configured by one or more units are connected. A first operation circuit (for example, a low-precision operation circuit 5) that performs an operation with an operation accuracy of 1 is applied to any layer, and a second operation that performs an operation with a second operation accuracy higher than the first operation accuracy The value of a predetermined explanatory variable is acquired for each application pattern that is information that determines to which layer a circuit (for example, the high-precision arithmetic circuit 6) is applied.
 目的関数計算手段75(例えば、目的関数計算部25)は、所定の説明変数で表される目的関数の値を、適用パターン毎に計算する。 The objective function calculating means 75 (for example, the objective function calculating unit 25) calculates the value of the objective function represented by a predetermined explanatory variable for each applied pattern.
 適用パターン決定手段77(例えば、適用パターン決定部27)は、目的関数の値が最小となる適用パターンを決定する。 The application pattern determination unit 77 (for example, the application pattern determination unit 27) determines an application pattern that minimizes the value of the objective function.
 そのような構成によって、判別モデルを用いた演算を最適化できるように、判別モデルの各層における演算精度を自動的に定めることができる。 構成 With such a configuration, the calculation accuracy of each layer of the discrimination model can be automatically determined so that the calculation using the discrimination model can be optimized.
 目的関数は、少なくとも、判別モデルを用いた演算の処理速度、および、演算結果の正確さを所定の説明変数として表されていてもよい。 The objective function may represent at least the processing speed of the calculation using the discriminant model and the accuracy of the calculation result as a predetermined explanatory variable.
 目的関数は、第1の演算回路と第2の演算回路との間で授受されるデータ量を所定の説明変数として表されていてもよい。 The objective function may be represented by a data amount exchanged between the first arithmetic circuit and the second arithmetic circuit as a predetermined explanatory variable.
 目的関数は、判別モデルを用いた演算を行う回路の回路規模を所定の説明変数として表されていてもよい。 The objective function may be represented by a circuit size of a circuit that performs an operation using the discriminant model as a predetermined explanatory variable.
 目的関数は、判別モデルを用いた演算での消費電力を所定の説明変数として表されていてもよい。 The objective function may represent power consumption in an operation using the discriminant model as a predetermined explanatory variable.
 説明変数値取得手段73が、所定の説明変数の値を実測により取得する構成であってもよい。 The explanation variable value acquisition means 73 may acquire the value of a predetermined explanation variable by actual measurement.
 説明変数値取得手段73が、所定の説明変数の値をシミュレーションにより取得する構成であってもよい。 The explanation variable value acquisition means 73 may acquire the value of a given explanation variable by simulation.
 以上、実施形態を参照して本願発明を説明したが、本願発明は上記の実施形態に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。 Although the present invention has been described with reference to the exemplary embodiments, the present invention is not limited to the above exemplary embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.
産業上の利用の可能性Industrial applicability
 本発明は、例えば、ニューラルネットワーク等の判別モデルを用いた演算を最適化する演算最適化装置に好適に適用される。 The present invention is suitably applied to, for example, an operation optimizing device that optimizes an operation using a discriminant model such as a neural network.
 5 低精度演算回路
 6 高精度演算回路
 7 第1メモリ
 8 第2メモリ
 9 第3メモリ
 18 処理装置
 19 設計情報記憶部
 21 判別モデル記憶部
 22 データ記憶部
 23 説明変数値取得部
 24 目的関数記憶部
 25 目的関数計算部
 26 計算結果記憶部
 27 適用パターン決定部
5 Low-precision arithmetic circuit 6 High-precision arithmetic circuit 7 First memory 8 Second memory 9 Third memory 18 Processing device 19 Design information storage unit 21 Discrimination model storage unit 22 Data storage unit 23 Explanation variable value acquisition unit 24 Objective function storage unit 25 objective function calculation unit 26 calculation result storage unit 27 application pattern determination unit

Claims (9)

  1.  1つ以上のユニットでそれぞれ構成された複数の層が結合された判別モデルを用いた演算で、第1の演算精度で演算を行う第1の演算回路をどの層に適用し、前記第1の演算精度よりも高い第2の演算精度で演算を行う第2の演算回路をどの層に適用するかを定めた情報である適用パターン毎に、所定の説明変数の値を取得する説明変数値取得手段と、
     前記所定の説明変数で表される目的関数の値を、適用パターン毎に計算する目的関数計算手段と、
     目的関数の値が最小となる適用パターンを決定する適用パターン決定手段とを備える
     ことを特徴とする演算最適化装置。
    The first arithmetic circuit that performs an arithmetic operation with a first arithmetic accuracy is applied to any layer by an arithmetic operation using a discriminant model in which a plurality of layers each configured by one or more units are combined, and Acquisition of an explanatory variable value for acquiring a value of a predetermined explanatory variable for each application pattern that is information that determines to which layer a second arithmetic circuit that performs an arithmetic operation with a second arithmetic accuracy higher than the arithmetic accuracy is applied. Means,
    Objective function calculating means for calculating the value of the objective function represented by the predetermined explanatory variable for each application pattern,
    An operation optimization device, comprising: an application pattern determining unit that determines an application pattern that minimizes the value of an objective function.
  2.  目的関数は、少なくとも、判別モデルを用いた演算の処理速度、および、演算結果の正確さを所定の説明変数として表される
     請求項1に記載の演算最適化装置。
    The arithmetic optimization device according to claim 1, wherein the objective function represents at least the processing speed of the arithmetic operation using the discriminant model and the accuracy of the arithmetic result as predetermined explanatory variables.
  3.  目的関数は、第1の演算回路と第2の演算回路との間で授受されるデータ量を所定の説明変数として表される
     請求項2に記載の演算最適化装置。
    The arithmetic optimization device according to claim 2, wherein the objective function is represented by a data amount exchanged between the first arithmetic circuit and the second arithmetic circuit as a predetermined explanatory variable.
  4.  目的関数は、判別モデルを用いた演算を行う回路の回路規模を所定の説明変数として表される
     請求項2または請求項3に記載の演算最適化装置。
    The arithmetic optimization device according to claim 2, wherein the objective function is represented by a circuit size of a circuit that performs an arithmetic operation using the discriminant model as a predetermined explanatory variable.
  5.  目的関数は、判別モデルを用いた演算での消費電力を所定の説明変数として表される
     請求項2から請求項4のうちのいずれか1項に記載の演算最適化装置。
    The operation optimization device according to any one of claims 2 to 4, wherein the objective function represents power consumption in an operation using the discriminant model as a predetermined explanatory variable.
  6.  説明変数値取得手段は、所定の説明変数の値を実測により取得する
     請求項1から請求項5のうちのいずれか1項に記載の演算最適化装置。
    The arithmetic optimization device according to any one of claims 1 to 5, wherein the explanatory variable value acquiring unit acquires a value of a predetermined explanatory variable by actual measurement.
  7.  説明変数値取得手段は、所定の説明変数の値をシミュレーションにより取得する
     請求項1から請求項5のうちのいずれか1項に記載の演算最適化装置。
    The operation optimization device according to claim 1, wherein the explanatory variable value acquiring unit acquires a value of a predetermined explanatory variable by simulation.
  8.  1つ以上のユニットでそれぞれ構成された複数の層が結合された判別モデルを用いた演算で、第1の演算精度で演算を行う第1の演算回路をどの層に適用し、前記第1の演算精度よりも高い第2の演算精度で演算を行う第2の演算回路をどの層に適用するかを定めた情報である適用パターン毎に、所定の説明変数の値を取得し、
     前記所定の説明変数で表される目的関数の値を、適用パターン毎に計算し、
     目的関数の値が最小となる適用パターンを決定する
     ことを特徴とする演算最適化方法。
    The first arithmetic circuit that performs an arithmetic operation with a first arithmetic accuracy is applied to any layer by an arithmetic operation using a discriminant model in which a plurality of layers each configured by one or more units are combined, and Acquiring a value of a predetermined explanatory variable for each application pattern that is information that determines to which layer a second arithmetic circuit that performs an arithmetic operation with a second arithmetic accuracy higher than the arithmetic accuracy is applied;
    The value of the objective function represented by the predetermined explanatory variable is calculated for each application pattern,
    A calculation optimization method characterized by determining an application pattern that minimizes the value of an objective function.
  9.  コンピュータに、
     1つ以上のユニットでそれぞれ構成された複数の層が結合された判別モデルを用いた演算で、第1の演算精度で演算を行う第1の演算回路をどの層に適用し、前記第1の演算精度よりも高い第2の演算精度で演算を行う第2の演算回路をどの層に適用するかを定めた情報である適用パターン毎に、所定の説明変数の値を取得する説明変数値取得処理、
     前記所定の説明変数で表される目的関数の値を、適用パターン毎に計算する目的関数計算処理、および、
     目的関数の値が最小となる適用パターンを決定する適用パターン決定処理
     を実行させるための演算最適化プログラム。
    On the computer,
    The first arithmetic circuit that performs an arithmetic operation with a first arithmetic accuracy in an arithmetic operation using a discriminant model in which a plurality of layers each composed of one or more units are combined is applied to any one of the layers. Acquisition of an explanatory variable value for acquiring a value of a predetermined explanatory variable for each application pattern that is information that determines to which layer a second arithmetic circuit that performs an arithmetic operation with a second arithmetic accuracy higher than the arithmetic accuracy is applied. processing,
    An objective function calculation process of calculating the value of the objective function represented by the predetermined explanatory variable for each application pattern, and
    An operation optimization program for executing an applied pattern determination process that determines an applied pattern that minimizes the value of the objective function.
PCT/JP2018/030769 2018-08-21 2018-08-21 Computation optimization device, method, and program WO2020039493A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2018/030769 WO2020039493A1 (en) 2018-08-21 2018-08-21 Computation optimization device, method, and program
JP2020537921A JP6973651B2 (en) 2018-08-21 2018-08-21 Arithmetic optimizers, methods and programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/030769 WO2020039493A1 (en) 2018-08-21 2018-08-21 Computation optimization device, method, and program

Publications (1)

Publication Number Publication Date
WO2020039493A1 true WO2020039493A1 (en) 2020-02-27

Family

ID=69592083

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/030769 WO2020039493A1 (en) 2018-08-21 2018-08-21 Computation optimization device, method, and program

Country Status (2)

Country Link
JP (1) JP6973651B2 (en)
WO (1) WO2020039493A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018010618A (en) * 2016-05-03 2018-01-18 イマジネイション テクノロジーズ リミテッド Convolutional neural network hardware configuration

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10621486B2 (en) * 2016-08-12 2020-04-14 Beijing Deephi Intelligent Technology Co., Ltd. Method for optimizing an artificial neural network (ANN)

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018010618A (en) * 2016-05-03 2018-01-18 イマジネイション テクノロジーズ リミテッド Convolutional neural network hardware configuration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIN, DARRYL D. ET AL.: "Fixed Point Quantization of Deep Convolutional Networks", ARXIV, 2 June 2016 (2016-06-02), XP055561866, Retrieved from the Internet <URL:https://arxiv.org/abs/1511.06393v3> [retrieved on 20180831] *

Also Published As

Publication number Publication date
JPWO2020039493A1 (en) 2021-04-30
JP6973651B2 (en) 2021-12-01

Similar Documents

Publication Publication Date Title
Yang Multiobjective firefly algorithm for continuous optimization
Rothmann et al. A survey of domain-specific architectures for reinforcement learning
US10540145B2 (en) Method and processing apparatus for performing arithmetic operation
US10146248B2 (en) Model calculation unit, control unit and method for calibrating a data-based function model
KR20200136514A (en) Device and method for executing forward calculation of artificial neural network
US20210312295A1 (en) Information processing method, information processing device, and information processing program
JP2019079523A (en) Generating randomness in neural networks
Neumann et al. Quantum reinforcement learning: Comparing quantum annealing and gate-based quantum computing with classical deep reinforcement learning
TWI782328B (en) Processor for neural network operation
WO2020039493A1 (en) Computation optimization device, method, and program
Yu et al. An improved artificial bee colony algorithm based on factor library and dynamic search balance
Pan et al. An Improved Quantum-behaved Particle Swarm Optimization Algorithm Based on Random Weight.
George et al. IEEE 754 floating-point addition for neuromorphic architecture
CN115577798A (en) Semi-federal learning method and device based on random acceleration gradient descent
RU2679225C2 (en) Method and device for ascertaining gradient of data-based function model
JP2014013555A (en) Neural network design method, fitting method, and program
Nozdrzykowski et al. Testing the significance of parameters of models estimating execution time of parallel program loops according to the Open MPI Standard
CN114692865A (en) Neural network quantitative training method and device and related products
Lou et al. Balanced prioritized experience replay in off-policy reinforcement learning
WO2020008642A1 (en) Learning device, learning circuit, learning method, and learning program
CN109670577B (en) Model generation method and device
WO2022260171A1 (en) Estimation device and model generation method
Alidoust AGI brain II: the upgraded version with increased versatility index
CN113011577B (en) Processing unit, processor core, neural network training machine and method
Kawamura et al. FPGA Implementation of Neuron Model Using Piecewise Nonlinear Function on Double-Precision Floating-Point Format

Legal Events

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

Ref document number: 18930836

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020537921

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18930836

Country of ref document: EP

Kind code of ref document: A1