学習画像数が 1,580,470枚、クラス数は81,313 種類となるような大規模な分類ネットワークを学習しようとしています。
メモリエラーを回避するために、trainingOptions 側で学習における MiniBatchSize を十分に小さく(例えば、MiniBatchSize = 1) 設定した場合でも、学習時にメモリエラーで停止します。
※ 検証データ数は、全データの30%にあたる 474,141 枚に設定しています。
下記はエラーメッセージとなります。
Starting parallel pool (parpool) using the 'local' profile ...
Connected to the parallel pool (number of workers: 2).
Initializing input data normalization.
======================================================================================================================
| Epoch | Iteration | Time Elapsed | Mini-batch | Validation | Mini-batch | Validation | Base Learning |
| | | (hh:mm:ss) | Accuracy | Accuracy | Loss | Loss | Rate |
======================================================================================================================
Error using trainNetwork (line 170)
Out of memory.
Error in overall (line 97)
net = trainNetwork(trDsAug, lgraph, options);
Caused by:
Error using nnet.internal.cnn.ParallelTrainer/train (line 96)
Error detected on worker 1.
Error using nnet.internal.cnn.util.aggregateArrayFromObservations (line
12)
Out of memory.