How to Improve Deep Learning Model Robustness by Adding Noise

Try running the example a few times.In this case, we can see a marked increase in the performance of the model on the hold out test set.We can also see from the line plot of accuracy over training epochs that the model no longer appears to show the properties of being overfit.Line Plot of Train and Test Accuracy With Hidden Layer NoiseWe can also experiment and add the noise after the outputs of the first hidden layer pass through the activation function.The complete example is listed below.Running the example reports the model performance on the train and test datasets.Surprisingly, we see little difference in the performance of the model.Again, we can see from the line plot of accuracy over training epochs that the model no longer shows sign of overfitting.Line Plot of Train and Test Accuracy With Hidden Layer Noise (alternate)This section lists some ideas for extending the tutorial that you may wish to explore.If you explore any of these extensions, I’d love to know.This section provides more resources on the topic if you are looking to go deeper.In this tutorial, you discovered how to add noise to deep learning models in Keras in order to reduce overfitting and improve model generalization.Specifically, you learned:Do you have any questions?.Ask your questions in the comments below and I will do my best to answer..…with just a few lines of python codeDiscover how in my new Ebook: Better Deep LearningIt provides self-study tutorials on topics like: weight decay, batch normalization, dropout, model stacking and much more…Skip the Academics..Just Results.Click to learn more.. More details

Leave a Reply