MaybeShewill-CV/CRNN_Tensorflow

train_loss and train accuracy is very good,but val_loss is hign

wzqy56789 opened this issue · 3 comments

I create 384 train samples and 96 val sapmles and every sample have 10 chinenese characters。Total chinenese characters is 50,it is mean __C.ARCH.NUM_CLASSES =51. And __C.ARCH.INPUT_SIZE = (220, 32),__C.ARCH.SEQ_LENGTH = 55 。

THEN I have trained 1000 EPOCHS,BATCH_SIZE=32. The train_loss is around 0.4 and train accuracy is around 0.99,but val_loss is above 50,val accuracy is aroud 0.02。and test is not good even using train jpg。

My question :What should I do to improve val accuracy and test accuracy ?

@wzqy56789 check if your test input image use the same preprocess function as training procedure:)

I found it that accuracy of test with batch_normalization is hign.

@wzqy56789 during testing process bn params should be frozen. I did not meet such a problem when i train the model:)