第14章コンピュータビジョン
14.2.1. Steps14.2.1 手順
In this section, we will introduce a common technique in transfer learning: fine-tuning. As shown in Fig. 14.2.1, fine-tuning consists of the following four steps:
英語のヒント
この節では、転移学習でよく使われる技法である微調整を紹介する。図14.2.1に示すように、微調整は次の四つの手順からなる。
- Pretrain a neural network model, i.e., the source model, on a source dataset (e.g., the ImageNet dataset).
英語のヒント
ソースデータセット(たとえばImageNetのデータセット)で、ニューラルネットワークのモデル、つまりソースモデルを事前学習する。 - Create a new neural network model, i.e., the target model. This copies all model designs and their parameters on the source model except the output layer. We assume that these model parameters contain the knowledge learned from the source dataset and this knowledge will also be applicable to the target dataset. We also assume that the output layer of the source model is closely related to the labels of the source dataset; thus it is not used in the target model.
英語のヒント
新しいニューラルネットワークのモデル、つまりターゲットモデルを作る。これは、出力層を除いて、ソースモデルのすべてのモデルの設計とそのパラメータをコピーする。これらのモデルのパラメータはソースデータセットから学んだ知識を含んでおり、この知識はターゲットデータセットにも当てはまると仮定する。また、ソースモデルの出力層はソースデータセットのラベルと密接に関係していると仮定する。そのため、それはターゲットモデルでは使わない。 - Add an output layer to the target model, whose number of outputs is the number of categories in the target dataset. Then randomly initialize the model parameters of this layer.
英語のヒント
ターゲットモデルに出力層を加える。その出力の数はターゲットデータセットのカテゴリの数である。それから、この層のモデルのパラメータをランダムに初期化する。 - Train the target model on the target dataset, such as a chair dataset. The output layer will be trained from scratch, while the parameters of all the other layers are fine-tuned based on the parameters of the source model.
英語のヒント
椅子のデータセットのようなターゲットデータセットでターゲットモデルを訓練する。出力層はゼロから訓練し、ほかのすべての層のパラメータは、ソースモデルのパラメータにもとづいて微調整する。
Fig. 14.2.1図14.2.1
Fine tuning.
英語のヒント
微調整。
When target datasets are much smaller than source datasets, fine-tuning helps to improve models’ generalization ability.
英語のヒント
ターゲットデータセットがソースデータセットよりずっと小さいとき、微調整はモデルの汎化能力を上げるのに役立つ。