JP7646497B2 - Learning device and learning method - Google Patents
Learning device and learning method Download PDFInfo
- Publication number
- JP7646497B2 JP7646497B2 JP2021133806A JP2021133806A JP7646497B2 JP 7646497 B2 JP7646497 B2 JP 7646497B2 JP 2021133806 A JP2021133806 A JP 2021133806A JP 2021133806 A JP2021133806 A JP 2021133806A JP 7646497 B2 JP7646497 B2 JP 7646497B2
- Authority
- JP
- Japan
- Prior art keywords
- loss
- model
- learning
- inference
- teacher
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 25
- 238000001514 detection method Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 12
- 238000004821 distillation Methods 0.000 description 11
- 238000013140 knowledge distillation Methods 0.000 description 10
- 238000000605 extraction Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000013135 deep learning Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は、学習装置および学習方法に関する。 The present invention relates to a learning device and a learning method.
従来、ディープラーニング(深層学習)の学習手法の一つとして、知識蒸留(Knowledge Distillation)と呼ばれる手法が知られている(例えば特許文献1参照)。知識蒸留においては、パラメータ数の多い大規模な教師モデルを用いて、パラメータ数の少ない生徒モデルの訓練が行われる。知識蒸留により、モデルのサイズを小さくしつつ、モデルの性能の低下を抑制することができる。 Conventionally, a method called knowledge distillation has been known as one of the learning methods for deep learning (see, for example, Patent Document 1). In knowledge distillation, a large-scale teacher model with a large number of parameters is used to train a student model with a small number of parameters. Knowledge distillation can reduce the size of the model while suppressing degradation of the model's performance.
知識蒸留を利用した学習手法において、教師モデルの推論誤差の大きさに関わらず一律に、教師モデルを用いた生徒モデルの訓練を行うと、教師モデルの推論誤差が大きい場合に、生徒モデルを誤って訓練する虞がある。すなわち、教師モデルの推論誤差を無視して生徒モデルの訓練を行うと、生徒モデルの性能を低下させる虞がある。 In a learning method that uses knowledge distillation, if a student model is trained using a teacher model uniformly regardless of the magnitude of the teacher model's inference error, there is a risk that the student model will be trained incorrectly if the teacher model has a large inference error. In other words, if the student model is trained while ignoring the inference error of the teacher model, there is a risk that the performance of the student model will be degraded.
本発明は、上記の点に鑑み、知識蒸留を利用した深層学習において、生徒モデルを適切に訓練することができる技術を提供することを目的とする。 In view of the above, the present invention aims to provide a technology that can appropriately train a student model in deep learning using knowledge distillation.
例示的な本発明の学習装置は、教師モデルを用いて生徒モデルを訓練する学習装置であって、前記教師モデルの推論結果の学習データに対する損失である第1損失を求める第1損失算出部と、前記生徒モデルの推論結果の学習データに対する損失である第2損失を求める第2損失算出部と、前記第1損失と前記第2損失とに基づいて前記教師モデルを用いた訓練とするか否かを判定する判定部と、を備える。 An exemplary learning device of the present invention is a learning device that trains a student model using a teacher model, and includes a first loss calculation unit that calculates a first loss, which is a loss for the learning data of the inference result of the teacher model, a second loss calculation unit that calculates a second loss, which is a loss for the learning data of the inference result of the student model, and a determination unit that determines whether or not to use the teacher model for training based on the first loss and the second loss.
例示的な本発明の学習方法は、教師モデルを用いて生徒モデルを訓練する学習方法であって、前記教師モデルの推論結果の学習データに対する損失である第1損失と、前記生徒モデルの推論結果の学習データに対する損失である第2損失とに基づいて、前記教師モデルを用いた訓練とするか否かを判定する。 An exemplary learning method of the present invention is a learning method for training a student model using a teacher model, and determines whether to use the teacher model for training based on a first loss, which is a loss of the inference result of the teacher model for the learning data, and a second loss, which is a loss of the inference result of the student model for the learning data.
例示的な本発明によれば、知識蒸留を利用した深層学習において、生徒モデルを適切に訓練することができる。 According to the exemplary present invention, in deep learning using knowledge distillation, a student model can be appropriately trained.
以下、本発明の例示的な実施形態について、図面を参照しながら詳細に説明する。 An exemplary embodiment of the present invention will now be described in detail with reference to the drawings.
<1.学習装置>
図1は、本発明の実施形態に係る学習装置10のハードウェア構成を示すブロック図である。学習装置10は、機械学習用の学習装置であり、学習手法として知識蒸留を利用する。学習装置10は、教師モデルを用いて生徒モデルを訓練する学習装置である。学習装置10は、教師モデルを用いて生徒モデルを訓練する学習方法を実行する。詳細には、学習装置10は、学習データおよび教師モデルを用いて生徒モデルに学習させる。
1. Learning device
1 is a block diagram showing a hardware configuration of a
本実施形態においては、学習データは、学習装置10に入力される。また、学習データは、正解ラベル付きの学習データである。学習装置10は、教師モデル及び生徒モデルを有する。教師モデルは、パラメータ数の多い大規模なディープニューラルネットワークであり、既に学習済みのモデルである。生徒モデルは、教師モデルに比べてパラメータ数の少ない小規模のディープニューラルネットワークである。生徒モデルは、これから学習(訓練)を行わせるモデルである。
In this embodiment, the learning data is input to the
なお、本実施形態では、教師モデルおよび生徒モデルは、物体検出を行うモデルである。教師モデルは、生徒モデルよりも高性能である。例えば、教師モデルの物体検出率は、生徒モデルの物体検出率よりも高い。本実施形態によれば、物体検出処理を高速で行うことができる高性能の学習済みモデルを、知識蒸留を用いて生成することができる。 In this embodiment, the teacher model and the student model are models that perform object detection. The teacher model has higher performance than the student model. For example, the object detection rate of the teacher model is higher than that of the student model. According to this embodiment, a high-performance trained model that can perform object detection processing at high speed can be generated using knowledge distillation.
図1に示すように、学習装置10は、プロセッサ11と記憶部12とを備える。記憶部12は、教師モデルおよび生徒モデルを記憶する。教師モデルは、学習済みパラメータを含む。生徒モデルは、学習により更新されるパラメータを含む。プロセッサ11は、記憶部12に記憶されている教師モデルを用いた学習データに対する推論、および、生徒モデルを用いた学習データに対する推論を行う機能を発揮する。プロセッサ11は、教師モデルの推論結果と、生徒モデルの訓練結果との誤差が小さくなるように、生徒モデルのパラメータを更新する機能を発揮する。なお、推論結果の代わりに、中間層の特徴マップが利用されてもよい。
As shown in FIG. 1, the
図2は、本発明の実施形態に係る学習装置10が備えるプロセッサ11の機能構成を示すブロック図である。プロセッサ11の機能は、記憶部12に記憶されるプログラムにしたがった演算処理の実行により発揮される。図2に示すように、本実施形態のプロセッサ11は、その機能として、抽出部110と、第1推論部111と、第2推論部112と、第1損失算出部113と、第2損失算出部114と、判定部115と、学習部116とを備える。換言すると、学習装置10は、抽出部110と、第1推論部111と、第2推論部112と、第1損失算出部113と、第2損失算出部114と、判定部115と、学習部116とを備える。抽出部110は、予め準備された複数の、正解ラベル付きの学習データから所定数の学習データを抽出してミニバッチを生成する。
FIG. 2 is a block diagram showing the functional configuration of the
第1推論部111は、学習済みの教師モデルを利用して、入力された学習データに対する推論を行う。第1推論部111の機能は、プロセッサ11によって記憶部12に記憶される教師モデルが読み込まれることにより実現される。推論により、推論の最終的な結果である推論結果や、中間出力である特徴マップ等が得られる。本実施形態では、学習データは画像データであり、第1推論部111は、入力された画像データに対する物体検出を行う。第1推論部111の推論結果には、物体の種類および位置の特定が含まれる。物体の種類は、例えば、歩行者、自転車、自動車、信号機等である。位置の特定には、バウンディングボックスが利用される。
The
第2推論部112は、教師モデルによる訓練の対象である生徒モデルを利用して、入力された学習データに対する推論を行う。第2推論部112の機能は、プロセッサ11によって記憶部12に記憶されている生徒モデルが読み込まれることにより実現される。推論により、推論の最終的な結果である推論結果や、中間出力である特徴マップ等が得られる。なお、生徒モデルのパラメータは、学習により逐次更新される。本実施形態では、上述のように学習データは画像データであり、第2推論部112は、入力された画像データに対する物体検出を行う。第2推論部112の推論結果には、第1推論部111と同様に、物体の種類と位置の特定とが含まれる。
The
第1損失算出部113は、教師モデルの推論結果の学習データに対する損失である第1損失Loss_1を求める。第1損失Loss_1は、教師モデルの推論結果と、学習データの正解ラベルとの誤差(以下、推論誤差と表現することがある)である。本実施形態では、学習タスクは物体検出であり、第1損失Loss_1には、例えば、クラス分類損失とバウンディングボックス回帰損失とが含まれる。第1損失Loss_1は、例えば、以下の式(1)により求めることができる。すなわち、第1損失Loss_1は、式(1)の第1項から第5項の和により求めることができる。
The first
なお、以下の式(1)は、物体検出アルゴリズムの一例であるYOLOを利用する場合を想定したものである。YOLOでは、入力画像をS×Sのグリッドに区切り、グリッド毎に、ある一定のアスペクト比を持つB個の矩形領域の中心座標(x、y)、幅と高さのスケール(w、h)、および、矩形領域内に物体が存在する確率(C)を予測する。さらに、各矩形領域に何らかの物体が存在するとき、その物体がどのクラスに属するかを示す事後確率p(c)も予測する。YOLOでは、矩形領域、物体の存在確率、クラスの事後確率の予測を、1つの損失関数に統合している。 Note that the following formula (1) assumes the use of YOLO, an example of an object detection algorithm. YOLO divides the input image into an S x S grid, and for each grid, predicts the center coordinates (x, y), width and height scales (w, h), and probability (C) of an object present in B rectangular regions with a certain aspect ratio. Furthermore, when an object is present in each rectangular region, it also predicts the posterior probability p(c) indicating which class the object belongs to. YOLO combines predictions of rectangular regions, object presence probability, and class posterior probability into a single loss function.
第2損失算出部114は、生徒モデルの推論結果の学習データに対する損失である第2損失Loss_2を求める。第2損失Loss_2は、生徒モデルの推論結果と、学習データの正解ラベルとの誤差(推論誤差)である。本実施形態では、学習タスクは物体検出であり、第2損失Loss_2には、例えば、クラス分類損失とバウンディングボックス回帰損失とが含まれる。第2損失Loss_2は、例えば、第1損失Loss_1と同様に式(1)を用いて求めることができる。すなわち、第2損失Loss_2は、式(1)の第1項から第5項の和により求めることができる。
The second
判定部115は、第1損失Loss_1と第2損失Loss_2とに基づいて教師モデルを用いた訓練とするか否かを判定する。すなわち、本実施形態の学習方法によれば、教師モデルの推論結果の学習データに対する第1損失Loss_1と、生徒モデルの推論結果の学習データに対する第2損失Loss_2とに基づいて、教師モデルを用いた訓練とするか否かが判定される。このような構成とすれば、例えば教師モデルの推論誤差が生徒モデルの推論誤差よりも大きい場合等に、教師モデルを用いた生徒モデルの訓練を行わない構成にできる。すなわち、教師モデルの誤った知識を生徒モデルに蒸留することを抑制することができる。
The
詳細には、判定部115は、第1損失Loss_1が第2損失Loss_2よりも小さい場合に、教師モデルを用いた訓練とすると判定する。これによれば、生徒モデルよりも優れた教師モデルの知識を適切に生徒モデルに蒸留することができ、生徒モデルの性能(物体検出率等)を適切に向上させることができる。
In detail, when the first loss Loss_1 is smaller than the second loss Loss_2, the
また、判定部115は、第1損失Loss_1が第2損失Loss_2以上である場合には、教師モデルを用いた訓練としないと判定する。これにより、生徒モデルに教師モデルの誤った知識の蒸留を行うことを抑制することができる。
In addition, if the first loss Loss_1 is equal to or greater than the second loss Loss_2, the
学習部116は、損失関数を用いて生徒モデルを学習する。学習部116は、損失関数により算出した損失が最小化するように生徒モデルを学習する。詳細には、学習部116は、誤差逆伝播法を用いて生徒モデルのパラメータの更新を行う。本実施形態では、学習部116は、判定部115の判定結果に応じて生徒モデルの学習の仕方を異ならせる。
The
学習部116は、教師モデルを用いた訓練とすると判定された場合に、第2損失Loss_2と、教師モデルに対する損失(蒸留損失)Ldstlとを用いて生徒モデルの損失Loss_sを求める。学習部116は、求めた生徒モデルの損失Loss_sに基づき生徒モデルの学習を行う。このような構成とすると、生徒モデルより優れた性能を有する教師モデルと、学習データとの両方を用いて生徒モデルを学習することができ、生徒モデルを高性能の学習モデルとすることができる。
When it is determined that training should be performed using the teacher model, the
なお、蒸留損失Ldstlは、教師モデルと生徒モデルとの間の、推論結果の誤差、或いは、中間層の特徴マップ(中間出力)の誤差である。本実施形態では、蒸留損失Ldstlは、教師モデルの特徴マップと、生徒モデルの特徴マップとの間の誤差である。蒸留損失Ldstlは、例えば、以下の式(2)で表されるL2損失であってよい。ただし、蒸留損失Ldstlは、L2損失以外であってもよく、例えば、教師モデルと生徒モデルの出力の分布間の損失を表すKLダイバージェンス等であってもよい。 The distillation loss Ldstl is the error of the inference result between the teacher model and the student model, or the error of the feature map of the intermediate layer (intermediate output). In this embodiment, the distillation loss Ldstl is the error between the feature map of the teacher model and the feature map of the student model. The distillation loss Ldstl may be, for example, the L2 loss represented by the following formula (2). However, the distillation loss Ldstl may be something other than the L2 loss, and may be, for example, the KL divergence that represents the loss between the distribution of the outputs of the teacher model and the student model.
また、学習部116は、教師モデルを用いた訓練としないと判定された場合に、生徒モデルの損失Loss_sを第2損失Loss_2として生徒モデルの学習を行う。この場合、学習データのみを用いて生徒モデルを学習することになるが、誤った知識を蒸留する可能性がある教師モデルを除外して学習を行うことができるので、生徒モデルの性能が低下することを抑制できる。
When it is determined that training should not be performed using the teacher model, the
<2.学習方法>
図3は、本発明の実施形態に係る学習装置10における生徒モデルの訓練の流れを示すフローチャートである。なお、図3に示すフローチャートの開始前に、公知の手法により学習が行われた学習済みの教師モデルが作成されている。
2. Learning Methods
3 is a flowchart showing a flow of training a student model in the
ステップS1において、抽出部110は、予め準備された複数の正解ラベル付きの学習データから所定数のデータをサンプリング(抽出)してミニバッチを生成する。学習データは、例えば、複数の画像データを含む。学習データに含まれる複数の画像データのそれぞれは、正解ラベルを有する。所定数は、適宜決められる任意の数である。例えば、予め準備された学習データ(画像データ)の総数が10000枚であるとした場合、所定数は100枚等とされる。ステップS1の処理が完了すると、次のステップS2に処理が進められる。なお、ミニバッチは、学習装置10とは別の装置で生成されてよい。すなわち、ミニバッチを構成するデータが学習装置10に適宜入力される構成としてもよい。このような構成の場合には、学習装置10は抽出部110を備えなくてよい。
In step S1, the
ステップS2では、第1推論部111による推論が行われる。詳細には、記憶部12から学習済みモデルである教師モデルのパラメータがプロセッサ11に読み込まれて、ミニバッチに対して教師モデルを用いた推論が行われる。当該推論により、ミニバッチを構成する各学習データに対して、推論の最終的な結果である推論結果が得られる。ステップS2の処理が完了すると、次のステップS3に処理が進められる。
In step S2, inference is performed by the
ステップS3では、第1損失算出部113が、ミニバッチを構成する各学習データについて、ステップS2で得られた推論結果と正解ラベルとを用いて第1損失Loss_1を算出する。第1損失Loss_1は、教師モデルの推論誤差である。第1損失Loss_1は、上述の式(1)により求めることができる。ステップS3の処理が完了すると、次のステップS4に処理が進められる。
In step S3, the first
ステップS4では、第2推論部112による推論が行われる。詳細には、記憶部12から学習対象である生徒モデルのパラメータがプロセッサ11に読み込まれて、ミニバッチに対して生徒モデルを用いた推論が行われる。当該推論により、ミニバッチを構成する各学習データに対して、推論の最終的な結果である推論結果が得られる。ステップS4の処理が完了すると、次のステップS5に処理が進められる。
In step S4, inference is performed by the
ステップS5では、第2損失算出部114が、ミニバッチを構成する各学習データについて、ステップS4で得られた推論結果と正解ラベルとを用いて第2損失Loss_2を算出する。第2損失Loss_2は生徒モデルの推論誤差である。第2損失Loss_2は、上述の式(1)により求めることができる。ステップS5の処理が完了すると、次のステップS6に処理が進められる。
In step S5, the second
なお、本実施形態では、教師モデルを用いた推論および損失の算出が、生徒モデルを用いた推論および損失の算出よりも先に行われる構成としているが、これは例示にすぎない。例えば、生徒モデルを用いた推論および損失の算出が、教師モデルを用いた推論および損失の算出よりも先に行われる構成としてもよい。 In this embodiment, the inference and loss calculation using the teacher model is performed before the inference and loss calculation using the student model, but this is merely an example. For example, the inference and loss calculation using the student model may be performed before the inference and loss calculation using the teacher model.
ステップS6では、判定部115によって、第1損失Loss_1が第2損失Loss_2よりも小さいか否かが確認される。第1損失Loss_1が第2損失Loss_2よりも小さい場合(ステップS6でYes)、次のステップS7に処理が進められる。一方、第1損失Loss_1が第2損失Loss_2以上である場合(ステップS6でNo)、ステップS11に処理が進められる。
In step S6, the
ステップS7では、蒸留損失Ldstlが算出される。蒸留損失Ldstlは、上述の式(2)により求めることができる。教師モデルの推論誤差が生徒モデルの推論誤差よりも小さく、教師モデルの推論が信頼できるために、教師モデルを用いた知識の蒸留を行うために、蒸留損失Ldstlが算出される。ステップS7の処理が完了すると、次のステップS8に処理が進められる。 In step S7, the distillation loss Ldstl is calculated. The distillation loss Ldstl can be calculated using the above formula (2). Since the inference error of the teacher model is smaller than the inference error of the student model and the inference of the teacher model is reliable, the distillation loss Ldstl is calculated to perform knowledge distillation using the teacher model. When the processing of step S7 is completed, the processing proceeds to the next step S8.
ステップS8では、生徒モデルの損失Loss_sが、第2損失Loss_2と蒸留損失Ldstlとを用いて得られる損失とされる。なお、生徒モデルの損失Loss_sは、詳細には、以下の式(3)で表される構成であってよい。
Loss_s = Loss_2 + λ・Ldstl (3)
λは、第2損失Loss_2と蒸留損失Ldstlとのバランスを調整する重み係数である。重み係数λは、任意に決定される定数である。ステップS8の処理が完了すると、次のステップS9に処理が進められる。
In step S8, the loss Loss_s of the student model is set to a loss obtained by using the second loss Loss_2 and the distillation loss Ldstl. In addition, the loss Loss_s of the student model may be expressed in detail by the following formula (3).
Loss_s = Loss_2 + λ・Ldstl (3)
λ is a weighting coefficient for adjusting the balance between the second loss Loss_2 and the distillation loss Ldstl. The weighting coefficient λ is a constant that is determined arbitrarily. When the process of step S8 is completed, the process proceeds to the next step S9.
ステップS9では、学習部116が生徒モデルの損失Loss_sが最小化するように生徒モデルを学習する。詳細には、学習部116は、誤差逆伝播法を用いて生徒モデルのパラメータを更新する。ステップS9の処理が完了すると、次のステップS10に処理が進められる。
In step S9, the
ステップS10では、所定の学習回数(Iteration)が実行されたか否かを確認する。所定の学習回数は、学習データの数等に応じて予め設定される。所定の学習回数が完了した場合(ステップS10でYes)、図3に示す生徒モデルの訓練(学習)が完了する。これにより、生徒モデルの学習を完了して学習済みモデルの完成としてもよいが、図3に示す学習処理を所定の回数(epoch数)繰り返して学習を完了する(学習済みモデルを完成する)構成としてもよい。 In step S10, it is confirmed whether a predetermined number of learning iterations has been performed. The predetermined number of learning iterations is set in advance according to the number of learning data, etc. When the predetermined number of learning iterations has been completed (Yes in step S10), the training (learning) of the student model shown in FIG. 3 is completed. This may complete the learning of the student model and complete the trained model, but the learning process shown in FIG. 3 may also be repeated a predetermined number of times (epoch number) to complete the learning (complete the trained model).
ステップS11では、、生徒モデルの損失Loss_sが、第2損失Loss_2とされる。これは、教師モデルの推論誤差が生徒モデルの推論誤差以上であり、教師モデルの推論が信頼できないために、教師モデルを用いた知識の蒸留を行わない趣旨である。生徒モデルは、正解ラベル付きの学習データのみを用いて学習される。すなわち、教師モデルを用いた訓練が行われない。ステップS11の処理が完了すると、上述のステップS9に処理が進められる。これにより、第2損失Loss_2(=Loss_s)が最小化するように、誤差逆伝播法を用いて生徒モデルの学習が行われる。 In step S11, the loss Loss_s of the student model is set to the second loss Loss_2. This is because the inference error of the teacher model is equal to or greater than the inference error of the student model, and the inference of the teacher model is unreliable, so knowledge distillation using the teacher model is not performed. The student model is trained using only training data with correct answer labels. In other words, training using the teacher model is not performed. When the processing of step S11 is completed, the processing proceeds to the above-mentioned step S9. As a result, the student model is trained using the backpropagation method so as to minimize the second loss Loss_2 (= Loss_s).
図3に示す学習手法によれば、教師モデルの推論が信頼できる場合に限って教師モデルの知識を生徒モデルに蒸留する構成であるために、教師モデルの知識を生徒モデルに適切に蒸留することができ、生徒モデルの性能の向上を図ることができる。図3に示す学習手法を用いた学習済みの生徒モデルは、教師モデルに比べてパラメータの数が少なく、高性能の処理を迅速に行うことができる。 According to the learning method shown in FIG. 3, the knowledge of the teacher model is distilled into the student model only when the inference of the teacher model is reliable, so that the knowledge of the teacher model can be appropriately distilled into the student model, and the performance of the student model can be improved. A student model that has been trained using the learning method shown in FIG. 3 has a smaller number of parameters than the teacher model, and can perform high-performance processing quickly.
<3.留意事項等>
本明細書中に開示されている種々の技術的特徴は、上記実施形態のほか、その技術的創作の主旨を逸脱しない範囲で種々の変更を加えることが可能である。すなわち、上記実施形態は、全ての点で例示であって、制限的なものではないと考えられるべきであり、本発明の技術的範囲は、上記実施形態の説明ではなく、特許請求の範囲によって示されるものであり、特許請求の範囲と均等の意味及び範囲内に属する全ての変更が含まれると理解されるべきである。また、本明細書中に示される複数の実施形態及び変形例は可能な範囲で適宜組み合わせて実施されてよい。
<3. Important points to note>
In addition to the above embodiment, various technical features disclosed in this specification can be modified in various ways without departing from the spirit of the technical creation. In other words, the above embodiment should be considered to be illustrative in all respects and not restrictive, and the technical scope of the present invention is indicated by the claims, not the description of the above embodiment, and should be understood to include all modifications that fall within the meaning and scope of the claims. In addition, the multiple embodiments and modifications shown in this specification may be implemented in appropriate combinations to the extent possible.
10・・・学習装置
113・・・第1損失算出部
114・・・第2損失算出部
115・・・判定部
116・・・学習部
10: Learning device 113: First loss calculation unit 114: Second loss calculation unit 115: Determination unit 116: Learning unit
Claims (6)
前記プロセッサは、
前記教師モデルの推論結果の学習データに対する損失である第1損失を求め、
前記生徒モデルの推論結果の学習データに対する損失である第2損失を求め、
前記第1損失と前記第2損失とに基づいて前記教師モデルを用いた訓練とするか否かを判定し、
前記第1損失が前記第2損失よりも小さい場合に、前記教師モデルを用いた訓練とする、学習装置。 A learning device for training a student model using a teacher model, comprising: a processor;
The processor,
A first loss is calculated , which is a loss of the inference result of the teacher model with respect to the learning data;
A second loss is calculated , which is a loss of the inference result of the student model with respect to the learning data;
determining whether to perform training using the teacher model based on the first loss and the second loss;
A learning device that performs training using the teacher model if the first loss is smaller than the second loss .
前記教師モデルの推論結果の学習データに対する損失である第1損失と、前記生徒モデルの推論結果の学習データに対する損失である第2損失とに基づいて、前記教師モデルを用いた訓練とするか否かを判定し、
前記第1損失が前記第2損失よりも小さい場合に、前記教師モデルを用いた訓練とする、学習方法。 A learning method for training a student model using a teacher model, comprising:
determining whether to perform training using the teacher model based on a first loss, which is a loss of the inference result of the teacher model for the learning data, and a second loss, which is a loss of the inference result of the student model for the learning data ;
A learning method, comprising: training using the teacher model if the first loss is smaller than the second loss .
前記コンピュータを、The computer,
前記教師モデルの推論結果の学習データに対する損失である第1損失を求めることと、calculating a first loss which is a loss of the inference result of the teacher model with respect to the training data;
前記生徒モデルの推論結果の学習データに対する損失である第2損失を求めることと、Obtaining a second loss, which is a loss of the inference result of the student model for the training data;
前記第1損失と前記第2損失とに基づいて前記教師モデルを用いた訓練とするか否かを判定することと、determining whether to perform training using the teacher model based on the first loss and the second loss;
前記第1損失が前記第2損失よりも小さい場合に、前記教師モデルを用いた訓練とすることと、When the first loss is smaller than the second loss, training is performed using the teacher model; and
を実行する手段として機能させる、プログラム。A program that serves as a means to execute a program.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021133806A JP7646497B2 (en) | 2021-08-19 | 2021-08-19 | Learning device and learning method |
| US17/687,019 US20230054706A1 (en) | 2021-08-19 | 2022-03-04 | Learning apparatus and learning method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021133806A JP7646497B2 (en) | 2021-08-19 | 2021-08-19 | Learning device and learning method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023028233A JP2023028233A (en) | 2023-03-03 |
| JP7646497B2 true JP7646497B2 (en) | 2025-03-17 |
Family
ID=85331654
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021133806A Active JP7646497B2 (en) | 2021-08-19 | 2021-08-19 | Learning device and learning method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7646497B2 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112183718A (en) | 2020-08-31 | 2021-01-05 | 华为技术有限公司 | Deep learning training method and device for computing equipment |
-
2021
- 2021-08-19 JP JP2021133806A patent/JP7646497B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112183718A (en) | 2020-08-31 | 2021-01-05 | 华为技术有限公司 | Deep learning training method and device for computing equipment |
Non-Patent Citations (1)
| Title |
|---|
| Seyed Iman Mirzadeh et al.,Improved Knowledge Distillation via Teacher Assistant,arXiv [online],2019年12月17日,pp.1-11,https://arxiv.org/abs/1902.03393 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023028233A (en) | 2023-03-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Henderson et al. | End-to-end training of object class detectors for mean average precision | |
| WO2021155706A1 (en) | Method and device for training business prediction model by using unbalanced positive and negative samples | |
| CN113569852B (en) | Semantic segmentation model training method, device, electronic device and storage medium | |
| CN114386604B (en) | Model distillation method, device, equipment and storage medium based on multi-teacher model | |
| KR102011788B1 (en) | Visual Question Answering Apparatus Using Hierarchical Visual Feature and Method Thereof | |
| CN110362814B (en) | Named entity identification method and device based on improved loss function | |
| CN111325318A (en) | Neural network training method, neural network training device and electronic equipment | |
| CN112200889A (en) | Sample image generation, image processing, intelligent driving control method and device | |
| CN111368634B (en) | Human head detection method, system and storage medium based on neural network | |
| WO2016095068A1 (en) | Pedestrian detection apparatus and method | |
| JP7697317B2 (en) | Expertise-based identification and quantification of confounding bias | |
| CN111709415A (en) | Object detection method, apparatus, computer equipment and storage medium | |
| US20230054706A1 (en) | Learning apparatus and learning method | |
| US20250265472A1 (en) | Diffusion-reward adversarial imitation learning | |
| CN118152897B (en) | Sensitive information identification model training method, device, equipment and storage medium | |
| US12190570B2 (en) | Object detection device, learning method, and recording medium | |
| JP7507172B2 (en) | Information processing method, information processing system, and information processing device | |
| CN116091905B (en) | A domain-adaptive impact crater detection method, system, device, and storage medium | |
| JP7310927B2 (en) | Object tracking device, object tracking method and recording medium | |
| JP7646497B2 (en) | Learning device and learning method | |
| JP7651406B2 (en) | Learning device and learning method | |
| CN116150038B (en) | Neuron sensitivity-based white-box test sample generation method | |
| CN118840610A (en) | Robust noise tag learning method based on double-flow sample distillation and related device | |
| CN119399610A (en) | Power image quality assessment method and system based on adaptive super network architecture | |
| CN112132269A (en) | Model processing method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240626 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20241217 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250131 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20250225 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250305 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7646497 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |