JP2023124376A - Information processing apparatus, information processing method, and program - Google Patents
Information processing apparatus, information processing method, and program Download PDFInfo
- Publication number
- JP2023124376A JP2023124376A JP2022028107A JP2022028107A JP2023124376A JP 2023124376 A JP2023124376 A JP 2023124376A JP 2022028107 A JP2022028107 A JP 2022028107A JP 2022028107 A JP2022028107 A JP 2022028107A JP 2023124376 A JP2023124376 A JP 2023124376A
- Authority
- JP
- Japan
- Prior art keywords
- neural network
- unit
- ema
- learning
- input data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000010365 information processing Effects 0.000 title claims description 24
- 238000003672 processing method Methods 0.000 title description 3
- 238000011156 evaluation Methods 0.000 claims abstract description 99
- 238000013528 artificial neural network Methods 0.000 claims abstract description 73
- 238000000034 method Methods 0.000 claims abstract description 18
- 230000006870 function Effects 0.000 claims description 25
- 238000012545 processing Methods 0.000 claims description 18
- 238000004364 calculation method Methods 0.000 description 34
- 238000012795 verification Methods 0.000 description 28
- 238000004891 communication Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000009977 dual effect Effects 0.000 description 4
- 238000012549 training Methods 0.000 description 4
- 238000013459 approach Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000000470 constituent Substances 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、情報処理装置、情報処理方法およびプログラムに関する。 The present invention relates to an information processing device, an information processing method, and a program.
ニューラルネットワーク(以下、「NN」とも記す。)は、画像認識などの問題において高い性能を有する。このNNを活用した分野において、学習用データを用いてNNを学習し、評価用データを用いてNNの性能の検証を行う。しかし、学習中におけるNNのパラメータは学習用データに依存することで激しく変化し、パラメータの激しい変化は過学習にもつながる恐れがある。過学習とは学習用データに過度に適応することであり、評価用データに対する精度が劣化する現象のことを差す。 A neural network (hereinafter also referred to as "NN") has high performance in problems such as image recognition. In the field utilizing the NN, learning data is used to learn the NN, and evaluation data is used to verify the performance of the NN. However, the parameters of the NN undergo drastic changes during learning due to their dependence on the training data, and drastic changes in the parameters may lead to over-learning. Over-learning is excessive adaptation to learning data, and refers to a phenomenon in which accuracy with respect to evaluation data deteriorates.
近年、この課題解決のため、NNを保存する際に、NNパラメータに対して指数移動平均(Exponentially Moving Average: EMA)を適用した頑強性向上手法が取り入れられることが多い。EMAは検証用NNを学習用NNとは別に用意し、学習用NNのパラメータと検証用NNのパラメータとの重み付き和を取る手法である。この手法により汎化性能が向上し、評価用データにおいても高精度な識別が期待できる。EMAの処理は、式(1)のように示される。 In recent years, in order to solve this problem, a method for improving robustness by applying an exponentially moving average (EMA) to the NN parameters is often adopted when storing the NN. EMA is a technique in which a verification NN is prepared separately from a learning NN, and a weighted sum of the parameters of the learning NN and the verification NN is obtained. This method improves the generalization performance, and high-precision identification can be expected even in the evaluation data. The processing of EMA is shown as Equation (1).
非特許文献1に記載の方法は、特に画像認識におけるEMAを用いた半教師あり学習の手法の一つであり、学習されたNNに比べるとEMAによって保存されたNNのほうが検証用データでの精度が高いことを示している。ここで、半教師有り学習とは、NNの学習に必要とされる膨大な入力データと教師ラベルの内、一部にのみ教師ラベルが存在する状態で学習する手法であり、人手による教師ラベル付与作業の負担を軽減できる。
The method described in Non-Patent
非特許文献2に記載の方法は、敵対的生成ネットワーク(Generative Adversarial Network: GAN)の学習にEMAを用いた学習手法の一つであり、学習されたNNに比べるとEMAによって保存されたNNのほうが安定して学習が進むことを示している。ここで、GANとはNNに入力されるデータの特徴を学習する手法であり、実在しないが高品質のデータを生成したり、入力データの特徴に沿ったデータの変換をしたりできる。 The method described in Non-Patent Document 2 is one of the learning methods using EMA for learning of a generative adversarial network (GAN). This indicates that learning progresses more stably. Here, GAN is a technique for learning the characteristics of data input to the NN, and can generate non-existent but high-quality data and convert data in line with the characteristics of the input data.
非特許文献1に記載の方法および非特許文献2に記載の方法は、式(1)の係数αが常に一定であり、学習開始時に人手で設定するパラメータとなる。しかし、学習対象となるNNまたは使用するデータセットによって適切な係数αが異なることも考えられる。したがって、ユーザは係数αを変えながら、NNの学習を複数回試行したり、学習後のNNの分析をしたりする必要があり、ユーザの負担が高くなる。
In the method described in
そこで、本発明は、これらの問題点を解決すべく提案されたものであり、ユーザの負担を軽減しつつ、高精度なニューラルネットワークを構築することを可能とする技術が提供されることが望まれる。 Therefore, the present invention has been proposed to solve these problems, and it is desirable to provide a technique that enables construction of a highly accurate neural network while reducing the burden on the user. be
上記問題を解決するために、本発明のある観点によれば、第1の入力データと、第1のニューラルネットワークとに基づいて、前記第1の入力データの第1の推論結果を出力する第1の演算部と、前記第1の推論結果に基づく第1の評価結果を出力する第1の評価部と、前記第1の評価結果に基づいて前記第1のニューラルネットワークの第1の重みパラメータを更新する第1の更新部と、第2の入力データと、更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークと、第2のニューラルネットワークと、前記第2のニューラルネットワークの重み係数とに基づいて、前記第2の入力データの第2の推論結果を出力する第2の演算部と、前記第2の推論結果に基づく第2の評価結果を出力する第2の評価部と、前記第2の評価結果に基づいて、前記重み係数を更新する重み係数更新部と、前記更新後の第1の重みパラメータと、前記第2のニューラルネットワークの第2の重みパラメータと、更新後の前記重み係数とに基づいて、前記第2の重みパラメータを更新する第2の更新部と、を備える、情報処理装置が提供される。 In order to solve the above problem, according to one aspect of the present invention, a first input data and a first neural network output a first inference result of the first input data. 1 calculation unit, a first evaluation unit that outputs a first evaluation result based on the first inference result, and a first weight parameter of the first neural network based on the first evaluation result a first update unit that updates the second input data; the first neural network in which the updated first weight parameter is set; a second neural network; and the second neural network a second calculation unit for outputting a second inference result of the second input data based on the weighting coefficient of the network; and a second calculation unit for outputting a second evaluation result based on the second inference result. an evaluation unit, a weighting factor updating unit that updates the weighting factor based on the second evaluation result, the updated first weighting parameter, and a second weighting parameter of the second neural network; and a second updating unit that updates the second weighting parameter based on the updated weighting factor.
前記第2の演算部は、前記更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークおよび前記第2のニューラルネットワークそれぞれの第1層に対して、前記第2の入力データを入力してもよい。 The second computing unit inputs the second input data to the first layer of each of the first neural network and the second neural network to which the updated first weight parameter is set. can be entered.
前記第2の演算部は、前記更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークおよび前記第2のニューラルネットワークそれぞれの第2層以降に対して、直前の層からの出力に対する前記重み係数による重み付き和を入力してもよい。 The second computing unit performs the following operations on the second and subsequent layers of each of the first neural network and the second neural network to which the updated first weight parameter is set: A weighted sum of the weighting factors for the output may be input.
前記第2の評価部は、前記第2の評価結果と教師ラベルとに基づく損失を算出し、前記損失に基づいて前記第2の評価結果を出力してもよい。 The second evaluation unit may calculate a loss based on the second evaluation result and the teacher label, and output the second evaluation result based on the loss.
前記重み係数更新部は、前記第2の評価結果に基づく誤差逆伝播法によって前記重み係数を更新してもよい。 The weighting factor updating unit may update the weighting factor by error backpropagation based on the second evaluation result.
前記第2の更新部は、前記更新後の第1の重みパラメータと、前記第2のニューラルネットワークの第2の重みパラメータとに対する、前記更新後の重み係数による重み付き和によって、前記第2の重みパラメータを更新してもよい。 The second updating unit calculates the second weighting parameter by a weighted sum of the updated first weighting parameter and the second weighting parameter of the second neural network using the updated weighting factor. Weight parameters may be updated.
前記重み係数は、前記第1のニューラルネットワークおよび前記第2のニューラルネットワークに含まれる層ごとに設けられてもよい。 The weighting factor may be provided for each layer included in the first neural network and the second neural network.
前記第1の入力データと前記第2の入力データとは、同じデータであってもよい。 The first input data and the second input data may be the same data.
前記第1の入力データと前記第2の入力データとは、異なるデータであってもよい。 The first input data and the second input data may be different data.
また、本発明の別の観点によれば、第1の入力データと、第1のニューラルネットワークとに基づいて、前記第1の入力データの第1の推論結果を出力することと、前記第1の推論結果に基づく第1の評価結果を出力することと、前記第1の評価結果に基づいて前記第1のニューラルネットワークの第1の重みパラメータを更新することと、第2の入力データと、更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークと、第2のニューラルネットワークと、前記第2のニューラルネットワークの重み係数とに基づいて、前記第2の入力データの第2の推論結果を出力することと、前記第2の推論結果に基づく第2の評価結果を出力することと、前記第2の評価結果に基づいて、前記重み係数を更新することと、前記更新後の第1の重みパラメータと、前記第2のニューラルネットワークの第2の重みパラメータと、更新後の前記重み係数とに基づいて、前記第2の重みパラメータを更新することと、を備える、情報処理方法が提供される。 According to another aspect of the present invention, outputting a first inference result of the first input data based on the first input data and a first neural network; outputting a first evaluation result based on the inference result of; updating a first weight parameter of the first neural network based on the first evaluation result; and second input data; Based on the first neural network set with the updated first weighting parameter, the second neural network, and the weighting factor of the second neural network, the second input data outputting an inference result of 2; outputting a second evaluation result based on the second inference result; updating the weighting factor based on the second evaluation result; updating the second weighting parameter based on the subsequent first weighting parameter, the second weighting parameter of the second neural network, and the updated weighting factor. A processing method is provided.
また、本発明の別の観点によれば、コンピュータを、第1の入力データと、第1のニューラルネットワークとに基づいて、前記第1の入力データの第1の推論結果を出力する第1の演算部と、前記第1の推論結果に基づく第1の評価結果を出力する第1の評価部と、前記第1の評価結果に基づいて前記第1のニューラルネットワークの第1の重みパラメータを更新する第1の更新部と、第2の入力データと、更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークと、第2のニューラルネットワークと、前記第2のニューラルネットワークの重み係数とに基づいて、前記第2の入力データの第2の推論結果を出力する第2の演算部と、前記第2の推論結果に基づく第2の評価結果を出力する第2の評価部と、前記第2の評価結果に基づいて、前記重み係数を更新する重み係数更新部と、前記更新後の第1の重みパラメータと、前記第2のニューラルネットワークの第2の重みパラメータと、更新後の前記重み係数とに基づいて、前記第2の重みパラメータを更新する第2の更新部と、を備える情報処理装置として機能させるプログラムが提供される。 According to another aspect of the present invention, a computer is provided with a first input data and a first neural network for outputting a first inference result of the first input data. a calculation unit, a first evaluation unit that outputs a first evaluation result based on the first inference result, and a first weight parameter of the first neural network that is updated based on the first evaluation result. a first update unit that performs the above, second input data, the first neural network in which the updated first weight parameter is set, a second neural network, and the second neural network a second calculation unit that outputs a second inference result of the second input data based on the weighting factor; and a second evaluation unit that outputs a second evaluation result based on the second inference result. a weighting factor updating unit that updates the weighting factor based on the second evaluation result; the updated first weighting parameter; the second weighting parameter of the second neural network; and a second updating unit that updates the second weighting parameter based on the weighting factor afterward.
以上説明したように本発明によれば、ユーザの負担を軽減しつつ、高精度なニューラルネットワークを構築することを可能とする技術が提供される。 As described above, according to the present invention, a technique is provided that enables construction of a highly accurate neural network while reducing the burden on the user.
以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。 Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. In the present specification and drawings, constituent elements having substantially the same functional configuration are denoted by the same reference numerals, thereby omitting redundant description.
また、本明細書および図面において、実質的に同一の機能構成を有する複数の構成要素を、同一の符号の後に異なる数字を付して区別する場合がある。ただし、実質的に同一の機能構成を有する複数の構成要素等の各々を特に区別する必要がない場合、同一符号のみを付する。また、異なる実施形態の類似する構成要素については、同一の符号の後に異なるアルファベットを付して区別する場合がある。ただし、異なる実施形態の類似する構成要素等の各々を特に区別する必要がない場合、同一符号のみを付する。 In addition, in this specification and drawings, a plurality of components having substantially the same functional configuration may be distinguished by attaching different numerals after the same reference numerals. However, when there is no particular need to distinguish between a plurality of constituent elements having substantially the same functional configuration, only the same reference numerals are used. Also, similar components in different embodiments may be distinguished by attaching different alphabets after the same reference numerals. However, when there is no particular need to distinguish between similar components of different embodiments, only the same reference numerals are used.
(0.実施形態の概要)
本発明の実施形態の概要について説明する。本発明の実施形態では、ニューラルネットワークの学習を行う情報処理装置(以下、「学習装置」とも言う。)について説明する。学習装置においては、学習用データに基づいてニューラルネットワークの学習が行われる(学習段階)。その後、識別装置において、学習済みのニューラルネットワークと識別用データ(テストデータ)とに基づいて識別結果が出力される(推論段階)。
(0. Outline of embodiment)
An outline of an embodiment of the present invention will be described. In the embodiment of the present invention, an information processing device (hereinafter also referred to as a "learning device") that performs neural network learning will be described. In the learning device, learning of the neural network is performed based on the learning data (learning stage). After that, the identification device outputs the identification result based on the trained neural network and identification data (test data) (inference stage).
本発明の実施形態では、学習装置と識別装置とが同一のコンピュータによって実現される場合を主に想定する。しかし、学習装置と識別装置とは、別のコンピュータによって実現されてもよい。かかる場合には、学習装置によって生成された学習済みのニューラルネットワークが識別装置に提供される。例えば、学習済みのニューラルネットワークは、学習装置から識別装置に記録媒体を介して提供されてもよいし、通信を介して提供されてもよい。 In the embodiments of the present invention, it is mainly assumed that the learning device and the identification device are realized by the same computer. However, the learning device and the identification device may be implemented by separate computers. In such a case, the trained neural network generated by the learning device is provided to the identification device. For example, the trained neural network may be provided from the learning device to the identification device via a recording medium or via communication.
以下では、学習装置において実行される「学習段階」について説明する。以下では、ニューラルネットワークを「NN」とも表記する。 The “learning stage” performed in the learning device will be described below. Below, a neural network is also written as "NN."
(1.第1の実施形態)
まず、本発明の第1の実施形態について説明する。
(1. First embodiment)
First, a first embodiment of the present invention will be described.
(学習装置の構成)
図1を参照しながら、本発明の第1の実施形態に係る学習装置の構成例について説明する。図1は、本発明の第1の実施形態に係る学習装置10の機能構成例を示す図である。図1に示されるように、本発明の第1の実施形態に係る学習装置10は、学習用データセット101と、入力部102と、学習用NN110と、評価部121と、更新部122と、検証用NN130と、EMA評価部141と、EMA更新部142と、保存部143とを備える。
(Structure of learning device)
A configuration example of a learning device according to the first embodiment of the present invention will be described with reference to FIG. FIG. 1 is a diagram showing a functional configuration example of a
学習用NN110は、第1のニューラルネットワークの例に該当し、重みパラメータ111を含んで構成される。重みパラメータ111は、第1の重みパラメータの例に該当し得る。また、学習装置10は、重みパラメータ111が設定された学習用NN110を用いて演算を行う演算部112を含んで構成される。検証用NN130は、第2のニューラルネットワークの例に該当し、EMA重みパラメータ131と、EMA係数132とを含んで構成される。EMA重みパラメータ131は、第2の重みパラメータの例に該当し得る。学習装置10は、EMA重みパラメータ131およびEMA係数132を用いて演算を行う二重演算部133を含んで構成される。
The learning
入力部102、演算部112、評価部121、更新部122、二重演算部133、EMA評価部141、EMA更新部142および保存部143などは、CPU(Central Processing Unit)またはGPU(Graphics Processing Unit)などの演算装置を含み、ROM(Read Only Memory)により記憶されているプログラムが演算装置によりRAMに展開されて実行されることにより、その機能が実現され得る。
The
このとき、当該プログラムを記録した、コンピュータに読み取り可能な記録媒体も提供され得る。あるいは、これらのブロックは、専用のハードウェアにより構成されていてもよいし、複数のハードウェアの組み合わせにより構成されてもよい。演算装置による演算に必要なデータは、図示しない記憶部によって適宜記憶される。 At this time, a computer-readable recording medium recording the program may also be provided. Alternatively, these blocks may be composed of dedicated hardware, or may be composed of a combination of multiple pieces of hardware. Data necessary for calculation by the calculation device are appropriately stored in a storage unit (not shown).
学習用データセット101、重みパラメータ111、EMA重みパラメータ131およびEMA係数132は、図示しない記憶部によって記憶される。かかる記憶部は、RAM(Random Access Memory)、ハードディスクドライブまたはフラッシュメモリなどのメモリによって構成されてよい。
The learning
初期状態において、重みパラメータ111、EMA重みパラメータ131およびEMA係数132それぞれには、初期値が設定されている。例えば、重みパラメータ111、EMA重みパラメータ131およびEMA係数132それぞれに設定される初期値は、ランダムな値であってよいが、どのような値であってもよい。例えば、重みパラメータ111、EMA重みパラメータ131およびEMA係数132それぞれに設定される初期値は、あらかじめ学習によって得られた学習済みの値であってもよい。
In the initial state, the
(学習用データセット101)
学習用データセット101は、複数の学習用データ(以下、「入力データ」とも言う。)を含んで構成される。複数の入力データそれぞれには、教師ラベルが対応付けられていてよい。なお、本発明の実施形態では、入力データが画像データである場合(特に、静止画像データである場合)を主に想定する。しかし、入力データの種類は特に限定されず、静止画像データ以外も入力データとして用いられ得る。例えば、入力データは、複数のフレームを含んだ動画像データであってもよいし、時系列データまたは音声データであってもよい。
(Learning data set 101)
The learning
(入力部102)
入力部102は、学習用データセット101から入力データを順次に取得し、取得した入力データをもとにミニバッチを作成し、作成したミニバッチを学習用NN110の演算部112および検証用NN130の二重演算部133それぞれに出力する。ミニバッチのサイズは特に限定されない。また、ここでは、学習用NN110および検証用NN130
それぞれに入力される入力データは同じデータである場合を主に想定する。しかし、学習用NN110および検証用NN130それぞれに入力される入力データは異なるデータであってもよい。
(Input unit 102)
The
It is mainly assumed that the input data input to each are the same data. However, the input data input to the
演算部112および二重演算部133それぞれは、ニューロンによって構築される計算グラフが処理順に接続されて構成されており、全体として1つのニューラルネットワークとみなされ得る。より詳細に、演算部112および二重演算部133それぞれは、畳み込み層、プーリング層および活性化関数を主に含んでよい。以下では、畳み込み層として、2次元畳み込み層が用いられる場合を主に想定するが、3次元畳み込み層が用いられてもよい。
Each of the
(演算部112)
演算部112は、入力部102から出力されたミニバッチに含まれる入力データと学習用NN110とに基づいて推論結果を得る。演算部112は、第1の演算部の例に該当し得る。また、演算部112によって得られる推論結果は、第1の推論結果の例に該当し得る。より詳細に、演算部112は、重みパラメータ111が設定された学習用NN110にミニバッチに含まれる入力データを入力させたことに基づいて、学習用NN110から出力されるデータを推論結果として得る。
(Calculation unit 112)
The
なお、演算部112から出力される推論結果の形式は、特に限定されない。しかし、演算部112から出力される推論結果の形式は、教師ラベルの形式と合わせて設定されているのがよい。例えば、教師ラベルが分類問題のクラスを示し、クラス数分の長さを有するone-hotベクトルである場合、演算部112から出力される推論結果の形式も、クラス数分の長さを有するベクトルであってよい。このとき、演算部112から出力される推論結果は、クラスごとの値(以下、「推論値」とも言う。)を含み得る。
Note that the format of the inference result output from the
一例として、演算部112によって全クラスの推論値の合計が1になるように調整される場合には、それぞれのクラスに対応する推論値は、それぞれのクラスに対応する確率に相当し得る。しかし、全クラスの推論値の合計は、演算部112によって1になるように調整されていなくてもよい。いずれの場合であっても、演算部112から出力される推論値は、そのクラスの確からしさが高いほど、大きい値であり得る。
As an example, when the
ここで、図2を参照しながら、演算部112の処理について説明する。
Here, the processing of the
図2は、本発明の第1の実施形態に係る演算部112および二重演算部133それぞれの処理を説明するための図である。図2を参照すると、演算部112の構成例が示されている。図2に示された例では、演算部112によって用いられる学習用NN110の複数の層のうち、第i層(ただし、i=1,2,・・・,n)が畳み込み層であるとし、その畳み込み層が「fi」と表現されている。畳み込み層fiには、重みパラメータ111のうち第i層に対応する重みパラメータが設定される。
FIG. 2 is a diagram for explaining processing of each of the
また、畳み込み層fiへの入力がxiと表現され、その畳み込み層fiからの出力がyiと表現されている。ただし、学習用NN110のi番目の処理層は、畳み込み層でなくてもよい。なお、第1層への入力x1は、入力部102から出力された入力データである。第2層以降への入力xi(i≧2)は、直前の層からの出力yi-1である。演算部112は、学習用NN110の最終層に対応する出力ynを推論結果として評価部121に出力する。
Also, the input to the convolution layer f i is expressed as x i and the output from the convolution layer f i is expressed as y i . However, the i-th processing layer of the
図1に戻って説明を続ける。 Returning to FIG. 1, the description continues.
(評価部121)
評価部121は、ミニバッチごとの推論結果に基づいて評価結果を得る。評価部121は、第1の評価部の例に該当し得る。より詳細に、評価部121は、ミニバッチごとに、推論結果と目標とに基づいて損失を算出し、ミニバッチごとに、損失に基づいて評価結果を得る。評価部121は、評価結果を更新部122に出力する。
(Evaluation unit 121)
The
ここで、目標は特定の目標に限定されず、一般的なニューラルネットワークにおいて用いられる目標と同様の目標が用いられてよい。例えば、教師あり学習が行われる場合、目標は、入力データに対応する教師ラベルであってもよい。 Here, the goal is not limited to a specific goal, and a goal similar to that used in general neural networks may be used. For example, when supervised learning is performed, the goal may be the supervised label corresponding to the input data.
損失の算出に用いられる損失関数は特定の関数に限定されず、一般的なニューラルネットワークにおいて用いられる損失関数と同様の損失関数が用いられてよい。例えば、損失関数は、教師ラベルと推論結果との差分に基づく平均二乗誤差であってもよいし、教師ラベルと推論結果との差分に基づく交差エントロピー誤差であってもよい。 The loss function used to calculate the loss is not limited to a specific function, and loss functions similar to loss functions used in general neural networks may be used. For example, the loss function may be the mean squared error based on the difference between the teacher label and the inference result, or the cross-entropy error based on the difference between the teacher label and the inference result.
(更新部122)
更新部122は、評価部121から出力された評価結果に基づいて、重みパラメータ111の更新を行う。これによって、推論結果が教師ラベルに近づくように、重みパラメータ111が訓練され得る。更新部122は、第1の更新部の例に該当し得る。より詳細に、更新部122は、評価結果に基づく誤差逆伝播法(バックプロパゲーション)によって重みパラメータ111を更新してよい。
(Update unit 122)
The
なお、更新部122は、重みパラメータ111の更新が終わるたびに、学習用NN110の学習の終了条件が満たされたか否かを判断する。学習の終了条件が満たされていないと判断された場合には、入力部102によって次の入力データが取得され、演算部112、評価部121および更新部122それぞれによって、当該次の入力データに基づく各自の処理が再度実行される。一方、学習用NN110の学習の終了条件が満たされたと判断された場合には、学習が終了される。
Note that the
なお、学習用NN110の学習の終了条件は特に限定されず、学習用NN110の学習がある程度行われたことを示す条件であればよい。
The condition for ending the learning of the learning
具体的に、学習用NN110の学習の終了件は、損失が閾値よりも小さいという条件を含んでもよい。あるいは、学習用NN110の学習の終了条件は、当該損失の変化が閾値よりも小さいという条件(当該損失が収束状態になったという条件)を含んでもよい。あるいは、学習用NN110の学習の終了条件は、重みパラメータ111の更新が所定の回数行われたという条件を含んでもよい。あるいは、学習用NN110の精度(例えば、正解率など)が算出される場合、学習用NN110の学習の終了条件は、精度が所定の割合(例えば、90%など)を超えるという条件を含んでもよい。
Specifically, the learning end condition of the
(二重演算部133)
二重演算部133は、入力部102から出力されたミニバッチに含まれる入力データと、更新部122による更新後の重みパラメータ111が設定された学習用NN110と、検証用NN130と、EMA係数132とに基づいて、推論結果(以下、「EMA推論結果」とも言う。)を得る。EMA推論結果は、第2の推論結果の例に該当し得る。二重演算部133は、第2の演算部の例に該当し得る。EMA係数132は、スカラーの係数であり、検証用NN130の重み係数に該当する。以下では、EMA係数132は、時刻tごとに変化するため、時刻tにおけるEMA係数132を重み係数αtとも表現する。
(Double operation unit 133)
The
なお、時刻tは、重みパラメータ111、EMA重みパラメータ131およびEMA係数132それぞれに対応する更新回数を示す。ここでは一例として、時刻tの初期値が0であり、重みパラメータ111、EMA重みパラメータ131またはEMA係数132それぞれの更新のたびに、その重みパラメータまたは係数に対応する時刻tが1増加する場合を想定する。
Note that the time t indicates the number of updates corresponding to the
ここで、図2を再度参照しながら、二重演算部133の処理について説明する。
Now, referring to FIG. 2 again, the processing of the
図2を参照すると、二重演算部133の構成例が示されている。図2に示された例では、二重演算部133によって用いられる検証用NN130の複数の層のうち、第i層(ただし、i=1,2,・・・,n)が畳み込み層であるとし、その畳み込み層が「f’i」と表現されている。畳み込み層f’iには、EMA重みパラメータ131のうち第i層に対応する重みパラメータが設定される。畳み込み層f’iと畳み込み層fiとは、設定される重みパラメータは異なるが、実行する処理は同じであってよい。
Referring to FIG. 2, a configuration example of the
また、畳み込み層f’iへの入力がXiと表現され、その畳み込み層f’iからの出力がZ’iと表現されている。ただし、検証用NN130の第i層は、畳み込み層でなくてもよい。なお、ここでは、検証用NN130の第1層への入力X1が、学習用NN110の第1層への入力x1と同じである場合を想定する。しかし、検証用NN130の第1層への入力X1は、学習用NN110の第1層への入力x1と異なってもよい。すなわち、学習用NN110への入力データと、検証用NN130への入力データとは同じでなくてもよい。
Also, the input to the convolutional layer f'i is expressed as Xi , and the output from the convolutional layer f'i is expressed as Z'i . However, the i-th layer of the
また、二重演算部133によって、学習用NN110に含まれる畳み込み層fiも用いられる。図2を参照すると、二重演算部133によって用いられる畳み込み層fiへの入力がXiと表現され、その畳み込み層f’iからの出力がZiと表現されている。二重演算部133は、畳み込み層f’iからの出力Z’i=f’i(Xi)と、畳み込み層fiからの出力Zi=fi(Xi)と、EMA係数132であるαtとに基づいて、出力Yiを算出する。
In addition, the convolution layer f i included in the
より詳細に、二重演算部133は、出力Zi=fi(Xi)と出力Z’i=f’i(Xi)とに対する、EMA係数132であるαtによる重み付き和によって、出力Yiを算出する。すなわち、二重演算部133は、Zi=fi(Xi)に(1-αt)を乗算し、出力Z’i=f’i(Xi)にαtを乗算し、乗算結果同士を足し合わせることによって、出力Yiを算出する。かかる出力Yiの算出式は、以下の式(2)によって表現される。
More specifically, the
式(2)は、fiとf’iとにおいて、対応する重みパラメータごとに計算される。第1層への入力X1は、ミニバッチに含まれる入力データであり、第2層以降への入力Xi(i≧2)は、直前の層からの出力Yi-1である。二重演算部133は、最終層に対応する出力YnをEMA推論結果としてEMA評価部141に出力する。なお、二重演算部133から出力されるEMA推論結果の形式は、演算部112から出力される推論結果の形式と同様であってよい。
Equation (2) is computed for each corresponding weight parameter in f i and f′ i . The input X 1 to the first layer is the input data contained in the mini-batch, and the input X i (i≧2) to the second and subsequent layers is the output Y i−1 from the immediately preceding layer. The
図1に戻って説明を続ける。 Returning to FIG. 1, the description continues.
(EMA評価部141)
EMA評価部141は、ミニバッチごとのEMA推論結果に基づいて評価結果(以下、「EMA評価結果」とも言う。)を得る。EMA評価部141は、第2の評価部の例に該当し得る。EMA評価結果は、第2の評価結果の例に該当し得る。より詳細に、EMA評価部141は、ミニバッチごとに、EMA推論結果と目標とに基づいて損失を算出し、ミニバッチごとに、損失に基づいてEMA評価結果を得る。EMA評価部141は、EMA評価結果をEMA更新部142に出力する。
(EMA evaluation unit 141)
The
ここで、目標は特定の目標に限定されず、一般的なニューラルネットワークにおいて用いられる目標と同様の目標が用いられてよい。例えば、教師あり学習が行われる場合、目標は、入力データに対応する教師ラベルであってもよい。 Here, the goal is not limited to a specific goal, and a goal similar to that used in general neural networks may be used. For example, when supervised learning is performed, the goal may be the supervised label corresponding to the input data.
損失の算出に用いられる損失関数は特定の関数に限定されず、一般的なニューラルネットワークにおいて用いられる損失関数と同様の損失関数が用いられてよい。例えば、損失関数は、教師ラベルとEMA推論結果との差分に基づく平均二乗誤差であってもよいし、教師ラベルとEMA推論結果との差分に基づく交差エントロピー誤差であってもよい。 The loss function used to calculate the loss is not limited to a specific function, and loss functions similar to loss functions used in general neural networks may be used. For example, the loss function may be the mean squared error based on the difference between the teacher label and the EMA inference result, or the cross entropy error based on the difference between the teacher label and the EMA inference result.
あるいは、損失関数は、以下の式(3)に示されるように、Label Smoothingが適用された教師ラベルとEMA推論結果との差分に基づく交差エントロピー誤差であってもよい。 Alternatively, the loss function may be the cross-entropy error based on the difference between the teacher label to which Label Smoothing is applied and the EMA inference result, as shown in Equation (3) below.
ここで、lemaは、EMA推論結果に基づく損失関数であり、Cは分類問題におけるクラス数であり、δはノイズの量であり、qは、正解クラスを1、それ以外を0とするone-hotベクトルによって表現される教師ラベルである。qlsは、Label Smoothingが適用された教師ラベルである。 Here, l ema is the loss function based on the EMA inference result, C is the number of classes in the classification problem, δ is the amount of noise, and q is the correct class as 1 and the others as 0. - is the teacher label represented by the hot vector. q ls is the teacher label with Label Smoothing applied.
(EMA更新部142)
EMA更新部142は、EMA評価部141から出力されたEMA評価結果に基づいて、EMA係数132を更新する。これによって、EMA推論結果が教師ラベルに近づくように、EMA重みパラメータ131が訓練され得る。EMA更新部142は、重み係数更新部の例に該当し得る。より詳細に、EMA更新部142は、EMA評価結果に基づく誤差逆伝播法(バックプロパゲーション)によってEMA係数132である重み係数αtを更新してよい。一例として、重み係数αtの更新式は、以下の式(4)によって表現され得る。
(EMA update unit 142)
The
ここで、lemaは、EMA推論結果に基づく損失関数であり、μは学習率である。EMA係数132である重み係数αtの更新条件が設定されており、更新条件が満たされた場合に重み係数αtが更新されてもよい。例えば、更新条件は、重みパラメータ111が更新されたという条件であってもよいし、ユーザによってあらかじめ指定された更新タイミングが到来したという条件であってもよい。
where l ema is the loss function based on the EMA inference results and μ is the learning rate. A condition for updating the weighting factor αt , which is the
更新タイミングとしては、更新間隔(例えば、所定の回数に1回など)が指定されていてもよい。あるいは、重み係数αtの更新間隔は、重みパラメータ111の更新開始から常に等間隔であってもよいが、等間隔でなくてもよい。例えば、重み係数αtは、重みパラメータ111の更新開始直後の初期段階(例えば、重みパラメータ111が所定の更新回数だけ更新されるまでの段階など)において更新されなくてもよい。
As the update timing, an update interval (for example, once every predetermined number of times) may be specified. Alternatively, the update interval of the weighting factor αt may be always equal intervals from the start of updating the
(保存部143)
保存部143は、更新後の重みパラメータ111と、EMA重みパラメータ131と、更新後のEMA係数132とに基づいて、EMA重みパラメータ131を更新する。保存部143は、第2の更新部の例に該当し得る。
(storage unit 143)
The
より詳細に、保存部143は、更新後の重みパラメータ111とEMA重みパラメータ131とに対する、更新後のEMA係数132による重み付き和によって、EMA重みパラメータ131を更新する。すなわち、保存部143は、更新後の重みパラメータ111に(1-αt+1)を乗算し、EMA重みパラメータ131にαt+1を乗算し、乗算結果同士を足し合わせることによって、更新後のEMA重みパラメータ131を算出する。かかる更新後のEMA重みパラメータ131の算出式は、以下の式(5)によって表現される。
More specifically, the
以上に説明したように、学習装置10による学習によって、重みパラメータ111が更新されるとともに、EMA重みパラメータ131が更新される。
As described above, learning by the
以上、本発明の第1の実施形態に係る学習装置の構成例について説明した。 The configuration example of the learning device according to the first embodiment of the present invention has been described above.
(学習段階の動作)
続いて、図3を参照しながら、本発明の第1の実施形態に係る学習装置10によって実行される「学習段階」の動作の流れについて説明する。図3は、本発明の第1の実施形態に係る学習装置10によって実行される学習段階の動作例を示すフローチャートである。
(Operation in learning stage)
Next, with reference to FIG. 3, the flow of operations in the "learning stage" performed by the
まず、入力部102は、学習用データセット101からバッチサイズの入力データを取得することによってミニバッチを作成し、作成したミニバッチを学習用NN110の演算部112に出力する(S101)。
First, the
続いて、演算部112は、入力部102によって作成されたミニバッチと重みパラメータ111が設定された学習用NN110とに基づいて、ミニバッチに対応する推論結果を得る(S102)。演算部112は、ミニバッチに対応する推論結果を評価部121に出力する。
Subsequently, the
評価部121は、演算部112から出力される推論結果を評価して評価結果を得る。評価部121は、評価結果を更新部122に出力する(S103)。更新部122は、評価部121から出力される評価結果に基づいて、学習用NN110の重みパラメータ111を更新する(S104)。検証用NN110を更新する場合(S105において「NO」)、すなわち、EMA係数132(重み係数αt)の更新条件が満たされない場合、S110に動作が移行される。
The
一方、二重演算部133は、検証用NN110を更新する場合(S105において「YES」)、すなわち、EMA係数132(重み係数αt)の更新条件が満たされた場合、入力部102からミニバッチを入力する。そして、二重演算部133は、入力部102から入力したミニバッチと、更新後の重みパラメータ111が設定された学習用NN110と、EMA重みパラメータ131が設定された検証用NN130と、EMA係数132とに基づいて、式(2)を用いてEMA推論結果を得る。二重演算部133は、EMA推論結果をEMA評価部141に出力する(S106)。
On the other hand, when updating the verification NN 110 (“YES” in S105), that is, when the update condition of the EMA coefficient 132 (weighting coefficient α t ) is satisfied, the
EMA評価部141は、二重演算部133から出力されるEMA推論結果を評価してEMA評価結果を得る(S107)。EMA評価部141は、EMA評価結果をEMA更新部142に出力する。EMA更新部142は、EMA評価部141から出力されるEMA評価結果に基づいてEMA係数132である重み係数αtを更新する(S108)。
The
その後、保存部143は、更新後の重みパラメータ111と、EMA重みパラメータ131と、更新後のEMA係数132とに基づいて、式(5)を用いて、EMA重みパラメータ131を更新する(S109)。
Thereafter, the
学習用NN110の学習の終了条件が満たされない場合(S110において「NO」)、S101に動作が移行される。一方、学習用NN110の学習の終了条件が満たされた場合(S110において「YES」)は、学習が終了される。
If the learning end condition of the learning
以上、本発明の第1の実施形態に係る学習装置10によって実行される「学習段階」の動作の流れについて説明した。
The flow of operations in the "learning stage" performed by the
(第1の実施形態のまとめ)
以上に説明したように、本発明の第1の実施形態に係る学習装置10は、検証用NNの構築におけるEMA処理において、検証用NNの重みパラメータと学習用NNの重みパラメータとの重み付き和を計算するときに用いられる係数を学習可能とする。これにより、最適な係数が自動的に決定されるため、安定した学習が可能になるという効果が享受される。また、これによって、係数を調整するユーザの負担が軽減され得るという効果が享受される。
(Summary of the first embodiment)
As described above, the
以上、本発明の第1の実施形態について説明した。 The first embodiment of the present invention has been described above.
(2.第2の実施形態)
続いて、本発明の第2の実施形態について説明する。本発明の第1の実施形態においては、EMA係数132がスカラーの係数αtである場合について説明した。これは、NNを構築する全ての層が同じ値によって重み付けされることを意味する。本発明の第2の実施形態においては、EMA係数がNNに含まれる層ごとに設けられる場合について説明する。
(2. Second embodiment)
Next, a second embodiment of the invention will be described. In the first embodiment of the present invention, the case where the
なお、本発明の第2の実施形態に係る学習装置10の機能構成図は、本発明の第1の実施形態に係る学習装置10の機能構成図(図1)と同様である。また、本発明の第2の実施形態に係る学習装置10は、本発明の第1の実施形態に係る学習装置10と比較して、EMA係数132、二重演算部133、EMA更新部142および保存部143が有する機能が異なり、その他の構成要素が有する機能は同様である。
A functional configuration diagram of the
したがって、以下では、本発明の第2の実施形態に係る学習装置10が有する、EMA係数132、二重演算部133、EMA更新部142および保存部143について主に説明し、その他の構成要素が有する機能の詳細な説明は省略する。
Therefore, hereinafter, the
本発明の第2の実施形態において、EMA係数132は、重み係数αt,i(i=1,2,・・・,n)によって表現される。すなわち、本発明の第2の実施形態において、EMA係数132である重み係数αtは、学習用NN110または検証用NN130を構成する層の総数nと同じ数設けられている。
In the second embodiment of the present invention, the
(二重演算部133)
二重演算部133は、入力部102から出力されたミニバッチに含まれる入力データと、更新部122による更新後の重みパラメータ111が設定された学習用NN110と、検証用NN130と、層ごとに設けられたEMA係数132とに基づいて、EMA推論結果を得る。
(Double operation unit 133)
The
図4は、本発明の第2の実施形態に係る二重演算部133の処理を説明するための図である。図4を参照すると、二重演算部133の構成例が示されている。図4に示された例では、第k層と第(k+1)層(ただし、k=1,2,・・・,n-1)に着目する。なお、畳み込み層fkは、本発明の第1の実施形態に係る畳み込み層fiと同様の構成を有し、畳み込み層f’kは、本発明の第1の実施形態に係る畳み込み層f’iと同様の構成を有する。
FIG. 4 is a diagram for explaining the processing of the
そして、畳み込み層f’kへの入力がXkと表現され、その畳み込み層f’kからの出力がZ’kと表現されている。また、畳み込み層fkへの入力がXkと表現され、その畳み込み層f’ kからの出力がZkと表現されている。二重演算部133は、畳み込み層f’kからの出力Z’k=f’k(Xk)と、畳み込み層fkからの出力Zk=fk(Xk)と、第k層に対応するEMA係数132であるαt,kとに基づいて、出力Ykを算出する。
The input to the convolutional layer f'k is expressed as Xk , and the output from the convolutional layer f'k is expressed as Z'k . Also, the input to the convolutional layer fk is expressed as Xk , and the output from the convolutional layer f'k is expressed as Zk . The
より詳細に、二重演算部133は、出力Zk=fk(Xk)と出力Z’k=f’k(Xk)とに対する、第k層に対応するEMA係数132であるαt,kによる重み付き和によって、出力Ykを算出する。すなわち、二重演算部133は、Zk=fk(Xk)に(1-αt,k)を乗算し、出力Z’k=f’k(Xk)にαt,kを乗算し、乗算結果同士を足し合わせることによって、出力Ykを算出する。かかる出力Ykの算出式は、以下の式(6)によって表現される。
More specifically , the dual
なお、出力Ykは、第(k+1)層への入力Xk+1となる。そして、第(k+1)層における処理も、第k層と同様にして実行される。すなわち、二重演算部133は、畳み込み層f’k+1からの出力Z’k+1=f’k+1(Xk+1)と、畳み込み層fk+1からの出力Zk+1=fk+1(Xk+1)と、EMA係数132であるαt,k+1とに基づいて、出力Yk+1を算出する。
Note that the output Y k becomes the input X k+1 to the (k+1)th layer. Processing in the (k+1)-th layer is also performed in the same manner as in the k-th layer. That is, the
より詳細に、二重演算部133は、出力Z’k+1=f’k+1(Xk+1)と出力Zk+1=fk+1(Xk+1)とに対する、EMA係数132であるαt,k+1による重み付き和によって、出力Yk+1を算出する。すなわち、二重演算部133は、Zk+1=fk+1(Xk+1)に(1-αt,k+1)を乗算し、出力Z’k+1=f’k+1(Xk+1)にαt,k+1を乗算し、乗算結果同士を足し合わせることによって、出力Yk+1を算出する。
More specifically, the
なお、出力Yk+1は、第(k+2)層への入力Xk+2となる。このようにして、第1層から最終層までの各層による処理が実行され、最終層に対応する出力Ynが算出される。二重演算部133は、最終層に対応する出力YnをEMA推論結果としてEMA評価部141に出力する。
Note that the output Y k+1 becomes the input X k+2 to the (k+2)th layer. In this way, each layer from the first layer to the final layer is processed, and the output Yn corresponding to the final layer is calculated. The
(EMA更新部142)
EMA更新部142は、EMA評価部141から出力されたEMA評価結果に基づいて、EMA係数132である重み係数αt,k(k=1,2,・・・,n)を更新する。これによって、EMA推論結果が教師ラベルに近づくように、EMA重みパラメータ131が訓練され得る。より詳細に、EMA更新部142は、EMA評価結果に基づく誤差逆伝播法(バックプロパゲーション)によってEMA係数132である重み係数αt,k(k=n,n-1,・・・,1)を順に更新してよい。一例として、重み係数αt,kの更新式は、以下の式(7)によって表現され得る。
(EMA update unit 142)
The
(保存部143)
保存部143は、第1層から最終層までの各層について、更新後の重みパラメータ111に(1-αt+1,k)を乗算し、EMA重みパラメータ131にαt+1,kを乗算し、乗算結果同士を足し合わせることによって、更新後のEMA重みパラメータ131を算出する。かかる更新後のEMA重みパラメータ131の算出式は、以下の式(8)によって表現される。
(storage unit 143)
For each layer from the first layer to the last layer, the
以上に説明したように、学習装置10による学習によって、重みパラメータ111が更新されるとともに、EMA重みパラメータ131が更新される。
As described above, learning by the
以上、本発明の第2の実施形態に係る学習装置の構成例について説明した。 The configuration example of the learning device according to the second embodiment of the present invention has been described above.
(学習段階の動作)
続いて、本発明の第2の実施形態に係る学習装置10によって実行される「学習段階」の動作の流れについて説明する。本発明の第2の実施形態に係る学習装置10によって実行される「学習段階」の動作例を示すフローチャートは、本発明の第1の実施形態に係る学習装置10によって実行される「学習段階」の動作例を示すフローチャート(図2)と同様である。
(Operation in learning stage)
Next, the flow of operations in the "learning stage" performed by the
また、本発明の第2の実施形態に係る学習装置10は、本発明の第1の実施形態に係る学習装置10と比較して、二重演算部133、EMA更新部142および保存部143の動作の詳細が異なり、その他の動作の詳細は同様である。したがって、以下では、本発明の第2の実施形態に係る学習装置10が有する二重演算部133、EMA更新部142および保存部143の動作について主に説明を行い、他の動作についての詳細な説明は省略する。
In addition, the
本発明の第2の実施形態においても、本発明の第1の実施形態と同様に、S101~S105が実行される。 Also in the second embodiment of the present invention, S101 to S105 are executed as in the first embodiment of the present invention.
続いて、二重演算部133は、入力部102から入力したミニバッチと、更新後の重みパラメータ111が設定された学習用NN110と、EMA重みパラメータ131が設定された検証用NN130と、第1層から最終層までの各層に対応するEMA係数132とに基づいて、式(6)を用いてEMA推論結果を得る。二重演算部133は、EMA推論結果をEMA評価部141に出力する(S106)。
Next, the
EMA評価部141は、二重演算部133から出力されるEMA推論結果を評価してEMA評価結果を得る(S107)。EMA評価部141は、EMA評価結果をEMA更新部142に出力する。EMA更新部142は、EMA評価部141から出力されるEMA評価結果に基づいて、式(7)を用いて第1層から最終層までの各層に対応するEMA係数132を更新する(S108)。
The
その後、保存部143は、更新後の重みパラメータ111と、EMA重みパラメータ131と、第1層から最終層までの各層に対応する更新後のEMA係数132とに基づいて、式(8)を用いて、EMA重みパラメータ131を更新する(S109)。
After that, the
本発明の第2の実施形態においても、本発明の第1の実施形態と同様に、S110が実行される。 Also in the second embodiment of the present invention, S110 is executed as in the first embodiment of the present invention.
以上、本発明の第2の実施形態に係る学習装置10によって実行される「学習段階」の動作の流れについて説明した。
The flow of operations in the "learning stage" performed by the
(第2の実施形態のまとめ)
以上に説明したように、本発明の第2の実施形態によれば、検証用NNの構築におけるEMA処理において、検証用NNの重みパラメータと学習用NNの重みパラメータとの重み付き和を計算するときに用いられる係数が学習可能であるたけでなく、その係数が学習用NNの層ごとに設けられる。これにより、最適な係数が層ごとに自動的に決定されるため、本発明の第1の実施形態と同様の効果が享受され得るだけでなく、さらに自由度の高い検証用NNが構築され得る。
(Summary of the second embodiment)
As described above, according to the second embodiment of the present invention, the weighted sum of the weight parameter of the verification NN and the weight parameter of the learning NN is calculated in the EMA processing in constructing the verification NN. Not only are the sometimes used coefficients learnable, but the coefficients are provided for each layer of the training NN. As a result, the optimum coefficient is automatically determined for each layer, so not only can the same effects as in the first embodiment of the present invention be obtained, but a verification NN with a higher degree of freedom can be constructed. .
以上、本発明の第2の実施形態について説明した。 The second embodiment of the present invention has been described above.
(3.ハードウェア構成例)
続いて、本発明の第1の実施形態に係る学習装置10のハードウェア構成例について説明する。なお、本発明の第2の実施形態に係る学習装置10のハードウェア構成も、本発明の第1の実施形態に係る学習装置10のハードウェア構成と同様に実現され得る。
(3. Hardware configuration example)
Next, a hardware configuration example of the
以下では、本発明の第1の実施形態に係る学習装置10のハードウェア構成例として、情報処理装置900のハードウェア構成例について説明する。なお、以下に説明する情報処理装置900のハードウェア構成例は、学習装置10のハードウェア構成の一例に過ぎない。したがって、学習装置10のハードウェア構成は、以下に説明する情報処理装置900のハードウェア構成から不要な構成が削除されてもよいし、新たな構成が追加されてもよい。
A hardware configuration example of the
図5は、本発明の第1の実施形態に係る学習装置10の例としての情報処理装置900のハードウェア構成を示す図である。情報処理装置900は、CPU(Central Processing Unit)901と、ROM(Read Only Memory)902と、RAM(Random Access Memory)903と、ホストバス904と、ブリッジ905と、外部バス906と、インタフェース907と、入力装置908と、出力装置909と、ストレージ装置910と、通信装置911と、を備える。
FIG. 5 is a diagram showing the hardware configuration of an
CPU901は、演算処理装置および制御装置として機能し、各種プログラムに従って情報処理装置900内の動作全般を制御する。また、CPU901は、マイクロプロセッサであってもよい。ROM902は、CPU901が使用するプログラムや演算パラメータ等を記憶する。RAM903は、CPU901の実行において使用するプログラムや、その実行において適宜変化するパラメータ等を一時記憶する。これらはCPUバス等から構成されるホストバス904により相互に接続されている。
The
ホストバス904は、ブリッジ905を介して、PCI(Peripheral Component Interconnect/Interface)バス等の外部バス906に接続されている。なお、必ずしもホストバス904、ブリッジ905および外部バス906を分離構成する必要はなく、1つのバスにこれらの機能を実装してもよい。
The
入力装置908は、マウス、キーボード、タッチパネル、ボタン、マイクロフォン、スイッチおよびレバー等ユーザが情報を入力するための入力手段と、ユーザによる入力に基づいて入力信号を生成し、CPU901に出力する入力制御回路等から構成されている。情報処理装置900を操作するユーザは、この入力装置908を操作することにより、情報処理装置900に対して各種のデータを入力したり処理動作を指示したりすることができる。
The
出力装置909は、例えば、CRT(Cathode Ray Tube)ディスプレイ装置、液晶ディスプレイ(LCD)装置、OLED(Organic Light Emitting Diode)装置、ランプ等の表示装置およびスピーカ等の音声出力装置を含む。
The
ストレージ装置910は、データ格納用の装置である。ストレージ装置910は、記憶媒体、記憶媒体にデータを記録する記録装置、記憶媒体からデータを読み出す読出し装置および記憶媒体に記録されたデータを削除する削除装置等を含んでもよい。ストレージ装置910は、例えば、HDD(Hard Disk Drive)で構成される。このストレージ装置910は、ハードディスクを駆動し、CPU901が実行するプログラムや各種データを格納する。
The storage device 910 is a device for data storage. The storage device 910 may include a storage medium, a recording device that records data on the storage medium, a reading device that reads data from the storage medium, a deletion device that deletes data recorded on the storage medium, and the like. The storage device 910 is configured by, for example, an HDD (Hard Disk Drive). The storage device 910 drives a hard disk and stores programs executed by the
通信装置911は、例えば、ネットワークに接続するための通信デバイス等で構成された通信インタフェースである。また、通信装置911は、無線通信または有線通信のどちらに対応してもよい。
The
以上、本発明の第1の実施形態に係る学習装置10のハードウェア構成例について説明した。
The hardware configuration example of the
(4.まとめ)
以上、添付図面を参照しながら本発明の好適な実施形態について詳細に説明したが、本発明はかかる例に限定されない。本発明の属する技術の分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本発明の技術的範囲に属するものと了解される。
(4. Summary)
Although the preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, the present invention is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field to which the present invention belongs can conceive of various modifications or modifications within the scope of the technical idea described in the claims. It is understood that these also naturally belong to the technical scope of the present invention.
本発明の第1の実施形態および本発明の第2の実施形態では、学習用データが画像データである場合(特に、静止画像データである場合)について主に説明した。しかし、学習用データの種類は特に限定されない。例えば、学習用データの種類に合わせた特徴量が抽出されれば、静止画像データ以外も学習用データとして用いられ得る。例えば、学習用データは、複数のフレームを含んだ動画像データであってもよいし、音声データであってもよいし、他の時系列データであってもよい。 In the first embodiment of the present invention and the second embodiment of the present invention, the case where the learning data is image data (particularly, the case where it is still image data) has been mainly described. However, the type of learning data is not particularly limited. For example, data other than still image data can be used as learning data if a feature amount suitable for the type of learning data is extracted. For example, the learning data may be moving image data including a plurality of frames, audio data, or other time-series data.
このとき、学習用データが静止画像データである場合には、学習用NN110および検証用NN130それぞれに含まれる畳み込み層として2次元畳み込み層が用いられるのが一般的である。一方、学習用NN110および検証用NN130それぞれに含まれる畳み込み層として3次元畳み込み層が用いられれば、学習用データとして動画像データが適用され得る。
At this time, when the learning data is still image data, generally two-dimensional convolution layers are used as the convolution layers included in each of the
本発明の第1の実施形態および本発明の第2の実施形態では、EMA係数132、すなわち重み係数αに対する制限が設けられていない。しかし、重み係数αに対して(0,1)の範囲に写像される関数を適用してもよい。例えば、(0,1)の範囲に写像される関数は、シグモイド関数sgmなどであってもよい。これによって、より安定した重み係数αの学習が行われることが期待され得る。αにシグモイド関数が適用された場合には、式(2)および式(5)は、以下の式(9)および式(10)に置き換えられる。
In the first embodiment of the invention and the second embodiment of the invention, no restriction is placed on the
10 学習装置
101 学習用データセット
102 入力部
111 重みパラメータ
112 演算部
121 評価部
122 更新部
131 EMA重みパラメータ
132 EMA係数
133 二重演算部
141 EMA評価部
142 EMA更新部
143 保存部
10
Claims (11)
前記第1の推論結果に基づく第1の評価結果を出力する第1の評価部と、
前記第1の評価結果に基づいて前記第1のニューラルネットワークの第1の重みパラメータを更新する第1の更新部と、
第2の入力データと、更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークと、第2のニューラルネットワークと、前記第2のニューラルネットワークの重み係数とに基づいて、前記第2の入力データの第2の推論結果を出力する第2の演算部と、
前記第2の推論結果に基づく第2の評価結果を出力する第2の評価部と、
前記第2の評価結果に基づいて、前記重み係数を更新する重み係数更新部と、
前記更新後の第1の重みパラメータと、前記第2のニューラルネットワークの第2の重みパラメータと、更新後の前記重み係数とに基づいて、前記第2の重みパラメータを更新する第2の更新部と、
を備える、情報処理装置。 a first computing unit that outputs a first inference result of the first input data based on the first input data and a first neural network;
a first evaluation unit that outputs a first evaluation result based on the first inference result;
a first updating unit that updates a first weight parameter of the first neural network based on the first evaluation result;
Based on the second input data, the first neural network set with the updated first weight parameter, the second neural network, and the weighting factor of the second neural network, the a second computing unit that outputs a second inference result of the second input data;
a second evaluation unit that outputs a second evaluation result based on the second inference result;
a weighting factor updating unit that updates the weighting factor based on the second evaluation result;
A second updating unit that updates the second weighting parameter based on the updated first weighting parameter, the second weighting parameter of the second neural network, and the updated weighting factor. and,
An information processing device.
前記更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークおよび前記第2のニューラルネットワークそれぞれの第1層に対して、前記第2の入力データを入力する、
請求項1に記載の情報処理装置。 The second computing unit
inputting the second input data to the first layer of each of the first neural network and the second neural network in which the updated first weight parameter is set;
The information processing device according to claim 1 .
前記更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークおよび前記第2のニューラルネットワークそれぞれの第2層以降に対して、直前の層からの出力に対する前記重み係数による重み付き和を入力する、
請求項1または2に記載の情報処理装置。 The second computing unit
For each of the first neural network and the second neural network to which the updated first weight parameter is set, the second and subsequent layers are weighted by the weight coefficient with respect to the output from the immediately preceding layer. enter the sum,
The information processing apparatus according to claim 1 or 2.
請求項1~3のいずれか一項に記載の情報処理装置。 The second evaluation unit calculates a loss based on the second evaluation result and the teacher label, and outputs the second evaluation result based on the loss.
The information processing apparatus according to any one of claims 1 to 3.
前記第2の評価結果に基づく誤差逆伝播法によって前記重み係数を更新する、
請求項1~4のいずれか一項に記載の情報処理装置。 The weighting factor updating unit
updating the weighting factor by error backpropagation based on the second evaluation result;
The information processing apparatus according to any one of claims 1 to 4.
前記更新後の第1の重みパラメータと、前記第2のニューラルネットワークの第2の重みパラメータとに対する、前記更新後の重み係数による重み付き和によって、前記第2の重みパラメータを更新する、
請求項1~5のいずれか一項に記載の情報処理装置。 The second updating unit
updating the second weighting parameter by a weighted sum of the updated first weighting parameter and the second weighting parameter of the second neural network by the updated weighting factor;
The information processing apparatus according to any one of claims 1 to 5.
請求項1~6のいずれか一項に記載の情報処理装置。 The weighting factor is provided for each layer included in the first neural network and the second neural network.
The information processing apparatus according to any one of claims 1 to 6.
請求項1~7のいずれか一項に記載の情報処理装置。 The first input data and the second input data are the same data,
The information processing apparatus according to any one of claims 1 to 7.
請求項1~7のいずれか一項に記載の情報処理装置。 The first input data and the second input data are different data,
The information processing apparatus according to any one of claims 1 to 7.
前記第1の推論結果に基づく第1の評価結果を出力することと、
前記第1の評価結果に基づいて前記第1のニューラルネットワークの第1の重みパラメータを更新することと、
第2の入力データと、更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークと、第2のニューラルネットワークと、前記第2のニューラルネットワークの重み係数とに基づいて、前記第2の入力データの第2の推論結果を出力することと、
前記第2の推論結果に基づく第2の評価結果を出力することと、
前記第2の評価結果に基づいて、前記重み係数を更新することと、
前記更新後の第1の重みパラメータと、前記第2のニューラルネットワークの第2の重みパラメータと、更新後の前記重み係数とに基づいて、前記第2の重みパラメータを更新することと、
を備える、情報処理方法。 outputting a first inference result of the first input data based on the first input data and a first neural network;
outputting a first evaluation result based on the first inference result;
updating a first weight parameter of the first neural network based on the first evaluation result;
Based on the second input data, the first neural network set with the updated first weight parameter, the second neural network, and the weighting factor of the second neural network, the outputting a second inference result for the second input data;
outputting a second evaluation result based on the second inference result;
updating the weighting factor based on the second evaluation result;
updating the second weighting parameter based on the updated first weighting parameter, the second weighting parameter of the second neural network, and the updated weighting factor;
A method of processing information, comprising:
第1の入力データと、第1のニューラルネットワークとに基づいて、前記第1の入力データの第1の推論結果を出力する第1の演算部と、
前記第1の推論結果に基づく第1の評価結果を出力する第1の評価部と、
前記第1の評価結果に基づいて前記第1のニューラルネットワークの第1の重みパラメータを更新する第1の更新部と、
第2の入力データと、更新後の前記第1の重みパラメータが設定された前記第1のニューラルネットワークと、第2のニューラルネットワークと、前記第2のニューラルネットワークの重み係数とに基づいて、前記第2の入力データの第2の推論結果を出力する第2の演算部と、
前記第2の推論結果に基づく第2の評価結果を出力する第2の評価部と、
前記第2の評価結果に基づいて、前記重み係数を更新する重み係数更新部と、
前記更新後の第1の重みパラメータと、前記第2のニューラルネットワークの第2の重みパラメータと、更新後の前記重み係数とに基づいて、前記第2の重みパラメータを更新する第2の更新部と、
を備える情報処理装置として機能させるプログラム。 the computer,
a first computing unit that outputs a first inference result of the first input data based on the first input data and a first neural network;
a first evaluation unit that outputs a first evaluation result based on the first inference result;
a first updating unit that updates a first weight parameter of the first neural network based on the first evaluation result;
Based on the second input data, the first neural network set with the updated first weight parameter, the second neural network, and the weighting factor of the second neural network, the a second computing unit that outputs a second inference result of the second input data;
a second evaluation unit that outputs a second evaluation result based on the second inference result;
a weighting factor updating unit that updates the weighting factor based on the second evaluation result;
A second updating unit that updates the second weighting parameter based on the updated first weighting parameter, the second weighting parameter of the second neural network, and the updated weighting factor. and,
A program that functions as an information processing device comprising
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022028107A JP2023124376A (en) | 2022-02-25 | 2022-02-25 | Information processing apparatus, information processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022028107A JP2023124376A (en) | 2022-02-25 | 2022-02-25 | Information processing apparatus, information processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023124376A true JP2023124376A (en) | 2023-09-06 |
Family
ID=87886056
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022028107A Pending JP2023124376A (en) | 2022-02-25 | 2022-02-25 | Information processing apparatus, information processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023124376A (en) |
-
2022
- 2022-02-25 JP JP2022028107A patent/JP2023124376A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110503192B (en) | Resource efficient neural architecture | |
US10460230B2 (en) | Reducing computations in a neural network | |
US11593611B2 (en) | Neural network cooperation | |
KR102410820B1 (en) | Method and apparatus for recognizing based on neural network and for training the neural network | |
US20230196202A1 (en) | System and method for automatic building of learning machines using learning machines | |
US10783452B2 (en) | Learning apparatus and method for learning a model corresponding to a function changing in time series | |
KR20190068255A (en) | Method and apparatus for generating fixed point neural network | |
US11449731B2 (en) | Update of attenuation coefficient for a model corresponding to time-series input data | |
CN108701253A (en) | The target output training neural network of operating specification | |
US11100388B2 (en) | Learning apparatus and method for learning a model corresponding to real number time-series input data | |
US10909451B2 (en) | Apparatus and method for learning a model corresponding to time-series input data | |
WO2022105108A1 (en) | Network data classification method, apparatus, and device, and readable storage medium | |
JP2020190996A (en) | Neural network weight reducing device, neural network weight reducing method, and program | |
JP7356738B2 (en) | Neural network learning method, neural network generation method, trained device, mobile terminal device, learning processing device, and computer program | |
WO2018130890A1 (en) | Learning apparatus and method for bidirectional learning of predictive model based on data sequence | |
US11875809B2 (en) | Speech denoising via discrete representation learning | |
KR20220032861A (en) | Neural architecture search method and attaratus considering performance in hardware | |
JP7279225B2 (en) | METHOD, INFORMATION PROCESSING DEVICE, AND PROGRAM FOR TRANSFER LEARNING WHILE SUPPRESSING CATASTIC FORGETTING | |
JP2023124376A (en) | Information processing apparatus, information processing method, and program | |
CN115148292A (en) | Artificial intelligence-based DNA (deoxyribonucleic acid) motif prediction method, device, equipment and medium | |
WO2020054402A1 (en) | Neural network processing device, computer program, neural network manufacturing method, neural network data manufacturing method, neural network use device, and neural network downscaling method | |
JP7211069B2 (en) | Information processing device, information processing program, and information processing method | |
JP6992864B1 (en) | Neural network weight reduction device, neural network weight reduction method and program | |
JP7092228B1 (en) | Learning equipment, learning methods and programs | |
JP2023008028A (en) | Information processor, information processing method, and program |