Как решить несбалансированное обучение многоотраслевой CNN? - PullRequest
0 голосов
/ 08 мая 2020

Я пытаюсь обучить CNN с двумя ветвями с одной глобальной потерей (кросс-энтропия). Во время обучения вторая ветвь хорошо работает с обучающими данными, однако на тестовых данных улучшения нет. Ниже приведены некоторые тренировочные эпохи. Как я мог решить эту проблему? Должен ли я, например, уменьшить скорость обучения этой ветви? Любое предложение, пожалуйста?

Epoch 11/200
6300/6300 [==============================] - 13306s 2s/step - loss: 0.2472 - dense_2_loss: 0.1238 - 
output_layer_loss: 0.0136 - dense_2_accuracy: 0.9680 - output_layer_accuracy: 0.9961 - val_loss: 
7.3816 - val_dense_2_loss: 0.5242 - val_output_layer_loss: 9.5758 - val_dense_2_accuracy: 0.8471 - 
val_output_layer_accuracy: 0.3407

Epoch 00011: saving model to .\conv3D_models\multi_loss_resnet50_2d_3d_2\model-300class-11- 
7.3816.hdf5
Epoch 12/200
6300/6300 [==============================] - 12947s 2s/step - loss: 0.2348 - dense_2_loss: 0.1128 - 
output_layer_loss: 0.0142 - dense_2_accuracy: 0.9715 - output_layer_accuracy: 0.9960 - val_loss: 
4.7467 - val_dense_2_loss: 0.3987 - val_output_layer_loss: 10.4081 - val_dense_2_accuracy: 0.8871 - 
val_output_layer_accuracy: 0.2135

Epoch 00012: saving model to .\conv3D_models\multi_loss_resnet50_2d_3d_2\model-300class-12- 
4.7467.hdf5
Epoch 13/200
6300/6300 [==============================] - 12659s 2s/step - loss: 0.2247 - dense_2_loss: 0.1106 - 
output_layer_loss: 0.0110 - dense_2_accuracy: 0.9723 - output_layer_accuracy: 0.9964 - val_loss: 
2.1732 - val_dense_2_loss: 0.0654 - val_output_layer_loss: 5.5907 - val_dense_2_accuracy: 0.9854 - 
val_output_layer_accuracy: 0.5731

Epoch 00013: saving model to .\conv3D_models\multi_loss_resnet50_2d_3d_2\model-300class-13- 
2.1732.hdf5
Epoch 14/200
6300/6300 [==============================] - 13482s 2s/step - loss: 0.2189 - dense_2_loss: 0.1101 - 
output_layer_loss: 0.0118 - dense_2_accuracy: 0.9721 - output_layer_accuracy: 0.9966 - val_loss: 
5.0793 - val_dense_2_loss: 2.1019 - val_output_layer_loss: 5.6319 - val_dense_2_accuracy: 0.5964 - 
val_output_layer_accuracy: 0.5510

Epoch 00014: saving model to .\conv3D_models\multi_loss_resnet50_2d_3d_2\model-300class-14- 
5.0793.hdf5
Epoch 15/200
6300/6300 [==============================] - 12588s 2s/step - loss: 0.2060 - dense_2_loss: 0.0955 - 
output_layer_loss: 0.0100 - dense_2_accuracy: 0.9761 - output_layer_accuracy: 0.9970 - val_loss: 
2.5835 - val_dense_2_loss: 0.7881 - val_output_layer_loss: 6.2259 - val_dense_2_accuracy: 0.7985 - 
val_output_layer_accuracy: 0.5279

Epoch 00015: saving model to .\conv3D_models\multi_loss_resnet50_2d_3d_2\model-300class-15- 
2.5835.hdf5
Epoch 16/200
6300/6300 [==============================] - 13579s 2s/step - loss: 0.1985 - dense_2_loss: 0.0961 - 
output_layer_loss: 0.0078 - dense_2_accuracy: 0.9766 - output_layer_accuracy: 0.9975 - val_loss: 
2.3251 - val_dense_2_loss: 0.3573 - val_output_layer_loss: 6.3141 - val_dense_2_accuracy: 0.8946 - 
val_output_layer_accuracy: 0.5089

Epoch 00016: saving model to .\conv3D_models\multi_loss_resnet50_2d_3d_2\model-300class-16- 
2.3251.hdf5
Epoch 17/200
6300/6300 [==============================] - 12636s 2s/step - loss: 0.1972 - dense_2_loss: 0.0950 - 
output_layer_loss: 0.0099 - dense_2_accuracy: 0.9772 - output_layer_accuracy: 0.9971 - val_loss: 
6.2125 - val_dense_2_loss: 0.2289 - val_output_layer_loss: 5.3858 - val_dense_2_accuracy: 0.9412 - 
val_output_layer_accuracy: 0.5879
Epoch 00017: saving model to .\conv3D_models\multi_loss_resnet50_2d_3d_2\model-300class-17- 
6.2125.hdf5
Epoch 18/200
6300/6300 [==============================] - 12118s 2s/step - loss: 0.1877 - dense_2_loss: 0.0890 - 
output_layer_loss: 0.0075 - dense_2_accuracy: 0.9785 - output_layer_accuracy: 0.9977 - val_loss: 
7.0123 - val_dense_2_loss: 0.5672 - val_output_layer_loss: 12.1034 - val_dense_2_accuracy: 0.8711 - 
val_output_layer_accuracy: 0.1402

Epoch 00018: saving model to .\conv3D_models\multi_loss_resnet50_2d_3d_2\model-300class-18- 
7.0123.hdf5
Epoch 19/200
6300/6300 [==============================] - 12985s 2s/step - loss: 0.1822 - dense_2_loss: 0.0848 - 
output_layer_loss: 0.0068 - dense_2_accuracy: 0.9789 - output_layer_accuracy: 0.9983 - val_loss: 
1.8378 - val_dense_2_loss: 0.0948 - val_output_layer_loss: 5.0504 - val_dense_2_accuracy: 0.9773 - 
val_output_layer_accuracy: 0.5194
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...