2
$\begingroup$

Iam training a Keras model for end-to-end speech recognition. I have my own dataset of speech containing about 400 wave files. Text transcriptions is also given as input. Model summary is:

_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
the_input (InputLayer)       (None, None, 26)          0         
_________________________________________________________________
layer_1_conv (Conv1D)        (None, None, 30)          3930      
_________________________________________________________________
conv_batch_norm (BatchNormal (None, None, 30)          120       
_________________________________________________________________
rnn_bi (GRU)                 (None, None, 40)          8520      
_________________________________________________________________
bt_rnn_bi (BatchNormalizatio (None, None, 40)          160       
_________________________________________________________________
bidirectional_15 (Bidirectio (None, None, 40)          19440     
_________________________________________________________________
bt_rnn_final (BatchNormaliza (None, None, 40)          160       
_________________________________________________________________
time_distributed_15 (TimeDis (None, None, 29)          1189      
_________________________________________________________________
softmax (Activation)         (None, None, 29)          0         
=================================================================
Total params: 33,519
Trainable params: 33,299
Non-trainable params: 220
_________________________________________________________________
None
  • Optimiser used: Adadelta()
  • Loss function: ctc_loss function.
  • Dropout: 0.5

Training and validation loss in last epochs is:

Epoch 392/400
27/27 [==============================] - 36s - loss: 19.9499 - val_loss: 16.5945

Epoch 393/400
27/27 [==============================] - 34s - loss: 18.9789 - val_loss: 14.1015

Epoch 394/400
27/27 [==============================] - 36s - loss: 17.9598 - val_loss: 14.2997

Epoch 395/400
27/27 [==============================] - 34s - loss: 17.1506 - val_loss: 15.1215

Epoch 396/400
27/27 [==============================] - 35s - loss: 17.4900 - val_loss: 14.0334

Epoch 397/400
27/27 [==============================] - 35s - loss: 17.7459 - val_loss: 14.7812

Epoch 398/400
27/27 [==============================] - 35s - loss: 18.3460 -  val_loss: 14.4461

Epoch 399/400
27/27 [==============================] - 35s - loss: 17.4311 - val_loss: 15.5965

Epoch 400/400
27/27 [==============================] - 35s - loss: 17.6892 - val_loss: 12.4165

Can anybody explain to me how this loss is interpreted? What could be the correct values of training loss and validation loss, so my model correctly predicts the output values?

I tried reducing the loss and it did reduce, with the difference of plus or minus 1 unit, but test tests were totally incorrect. Can anyone suggest me ways to gain correct test results?

$\endgroup$
1
$\begingroup$

The key here is dropout. When a model trains with dropout, only a percentage of the total weights (in your case 50%) are used in predictions, which tends to lower the prediction accuracy. When the validation data is tested, dropout is turned off, and the validation loss tends to be a lot lower. see this answer to a similar question for more info.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.