Why validation accuracy remains at 75% while train accuracy is 100 %?

February 02, 2019, at 12:40 PM

I used my own data set to train a model using retrain.py file from Tensorflow site. However, with my first set of images, I am seeing test accuracy of 100% while validation accuracy is at 70%. I see that validation entropy is increasing which tells overfitting. I am new to this field and got to this stage by following online tutorials.

I did not enable random brightness, crop and flip yet for training. I am trying to understand why is this behaviour? I tried flower example and it worked as expected. Cross-entropy got lowest instead of increasing with my data set.

Could some one explain whats going on inside the CNN here ?

Answer 1

This simply means your model is overfitting. Overfitting means your model is not generalizing well to unseen data (ie the validation data). What you can do is add some form of regularization (L2 is used normally). What this does is it penalizes weights from getting very high values which would thereby lead to overfitting. This will also act against the model trying to fit outliers which again leads to less generalization and more overfitting.

Answer 2

Your model has over-fitted on the training data. If its a large model, you should consider using transfer learning where you train the model on a large dataset like ImageNet and then fine-tune on your data. You can also try adding some form of regularization to prevent overfitting specially Dropout and L2 regularization.

What is the scope of PHP set_time_limit()?

What is the scope of PHP set_time_limit()?

I still don't fully understand how set_time_limit() works, and the documentation didn't say anything about scopeLets say I have the following code:

When I get the file from s3 bucket, i can download in html page, but unable to view the pdf file

When I get the file from s3 bucket, i can download in html page, but unable to view the pdf file

I want to view the pdf file from S3 bucket in html using iframe/embed tagAnd the answer is :

Laravel friendship package [on hold]

Laravel friendship package [on hold]

can any one please confirm is this package friendship package by hootlex is good for friendship structure like instagram? Is it bug free?