{"id":651,"date":"2020-08-24T09:01:04","date_gmt":"2020-08-24T09:01:04","guid":{"rendered":"https:\/\/data-science.gotoauthority.com\/2020\/08\/24\/how-to-handle-overfitting-in-deep-learning-models\/"},"modified":"2020-08-24T09:01:04","modified_gmt":"2020-08-24T09:01:04","slug":"how-to-handle-overfitting-in-deep-learning-models","status":"publish","type":"post","link":"https:\/\/wealthrevelation.com\/data-science\/2020\/08\/24\/how-to-handle-overfitting-in-deep-learning-models\/","title":{"rendered":"How to Handle Overfitting In Deep Learning Models"},"content":{"rendered":"<div id=\"tve_editor\" data-post-id=\"5085\">\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e6f5356\"><span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/1-handle-overfitting-in-deep-learning-models.png?resize=613%2C360&amp;ssl=1\" class=\"tve_image wp-image-5087\" alt=\"How to Handle Overfitting In Deep Learning Models\" data-id=\"5087\" width=\"613\" data-init-width=\"2878\" height=\"360\" data-init-height=\"1692\" title=\"Handle overfitting in deep learning models\" loading=\"lazy\" data-width=\"613\" data-height=\"360\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5087\" alt=\"How to Handle Overfitting In Deep Learning Models\" data-id=\"5087\" width=\"613\" data-init-width=\"2878\" height=\"360\" data-init-height=\"1692\" title=\"Handle overfitting in deep learning models\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/1-handle-overfitting-in-deep-learning-models.png?resize=613%2C360&amp;ssl=1\" data-width=\"613\" data-height=\"360\" data-recalc-dims=\"1\"><\/span><\/div>\n<div class=\"thrv_wrapper thrv_text_element tve-froala fr-box fr-basic\">\n<p dir=\"ltr\">Deep learning is one of the most revolutionary technologies at present. It gives machines the ability to think and learn on their own. The key motivation for deep learning is to build algorithms that mimic the <strong>human brain<\/strong>.\u00a0<\/p>\n<p dir=\"ltr\">To achieve this we need to <strong>feed<\/strong> as much as <strong>relevant data<\/strong> for the models to learn. Unlike <a href=\"https:\/\/dataaspirant.com\/supervised-and-unsupervised-learning\/\" target=\"_blank\" class=\"tve-froala\" rel=\"noopener noreferrer\">machine learning algorithms<\/a> the deep learning algorithms learning won\u2019t be <strong>saturated<\/strong> with feeding more data. But feeding more data to deep learning models will lead to <strong>overfitting<\/strong> issue.<\/p>\n<p dir=\"ltr\">That\u2019s why developing a more generalized deep learning model is always a challenging problem to solve. Usually, we need <strong>more data<\/strong> to train the deep learning model. In order to get an efficient score we have to feed more data to the model. But unfortunately, in some cases, we face issues with a <a href=\"https:\/\/dataaspirant.com\/handle-imbalanced-data-machine-learning\/\" target=\"_blank\" rel=\"noopener noreferrer\">lack of data<\/a>.\u00a0<\/p>\n<p dir=\"ltr\">One of the most common problems with building neural networks is overfitting. The key reason is, the build model is not generalized well and it\u2019s well-optimized only for the training dataset. In layman terms, the model memorized how to predict the target class only for the training dataset.\u00a0<\/p>\n<p dir=\"ltr\">The other cases overfitting usually happens when we <strong>don\u2019t have enough<\/strong> data, or because of complex architectures without <strong>regularizations<\/strong>.<\/p>\n<p dir=\"ltr\">If we don&#8217;t have the sufficient data to feed, the model will fail to capture the trend in data. It tries to understand each and every data point in training data and performs poorly on test\/unseen data.\u00a0<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_tw_qs tve_clearfix\" data-url=\"https:\/\/twitter.com\/intent\/tweet\" data-via=\"\" data-use_custom_url=\"\" data-css=\"tve-u-1741e96902b\">\n<div class=\"thrv_tw_qs_container\">\n<div class=\"thrv_tw_quote\">\n<p>Learn how to handle overfitting in deep learning models.<\/p>\n<\/div>\n<p>\n\t\t\t<span><br \/>\n\t\t\t\t<i><\/i><br \/>\n\t\t\t\t<span class=\"thrv_tw_qs_button_text thrv-inline-text tve_editable\">Click to Tweet<\/span><br \/>\n\t\t\t<\/span>\n\t\t<\/p>\n<\/div>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">In some cases, the model is overfitted if we use very complex neural network architecture without applying proper <strong>data preprocessing<\/strong> techniques to handling the overfitting.<\/p>\n<p dir=\"ltr\">So we need to learn how to apply smart techniques to preprocess the data before we <strong>start building<\/strong> the deep learning models. These techniques we are going to see in the next section in the article.<\/p>\n<p dir=\"ltr\">In this article, you are going to learn how smartly we can handle overfitting in <a href=\"https:\/\/dataaspirant.com\/category\/deep-learning\/\" target=\"_blank\" rel=\"noopener noreferrer\">deep learning<\/a>, this helps to build the best and highly accurate models.<\/p>\n<p dir=\"ltr\">Before we drive further let\u2019s see what you learning in this article.<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h2 id=\"t-1598238280893\" class=\"\">Deep learning Introduction<\/h2>\n<p dir=\"ltr\">High-end research is happening in the deep learning field, every day some new features or new model architecture or well-optimized models were going up to give continuous updates in this field. This makes the deep learning field young all the time, its growth rate is exponentially increasing.<\/p>\n<p dir=\"ltr\">The growth of this field is reasonable and expected one too. If we observe, In the past two decades back, we had problems like storing data, data scarcity, lack of \u00a0high computing processors, cost of processors, etc.\u00a0<\/p>\n<p dir=\"ltr\">At present, the scenario was completely different. <strong>Big data<\/strong> came into picture which allows you to store huge amounts of data so easily. We are having very powerful computing processors with very low\/cheap cost. And also we can solve almost any problem with the help of <a href=\"https:\/\/dataaspirant.com\/handwritten-digits-recognition-tensorflow-python\/\" target=\"_blank\" rel=\"noopener noreferrer\">neural networks<\/a>.\u00a0<\/p>\n<p dir=\"ltr\">Deep learning algorithms have a lot of <strong>different architectures<\/strong> like\u00a0<\/p>\n<ul class=\"\">\n<li class=\"\">ANN (Artificial Neural Networks),\u00a0<\/li>\n<li class=\"\">CNN (Convolutional Neural Networks),<\/li>\n<li class=\"\">RNN (Recurrent Neural Networks), etc<\/li>\n<\/ul>\n<p dir=\"ltr\">To solve complex problems in an efficient manner. It is able to perform different kinds of approaches in a better way. The architectures are giving the ability to classify the images, detect the objects, segment the objects\/images, forecasting the future, and so on.\u00a0<\/p>\n<h3 id=\"t-1598238280894\" class=\"\">Deep Learning Applications<\/h3>\n<p dir=\"ltr\">We have plenty of real-world applications in deep learning, Which makes this field super hot.<\/p>\n<p dir=\"ltr\">You can see a few examples below<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e721b38\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/2-deep-learning-application.png?resize=613%2C360&amp;ssl=1\" class=\"tve_image wp-image-5095\" alt=\"deep learning application\" data-id=\"5095\" width=\"613\" data-init-width=\"2878\" height=\"360\" data-init-height=\"1692\" title=\"deep learning application\" loading=\"lazy\" data-width=\"613\" data-height=\"360\" data-css=\"tve-u-1741e72404d\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5095\" alt=\"deep learning application\" data-id=\"5095\" width=\"613\" data-init-width=\"2878\" height=\"360\" data-init-height=\"1692\" title=\"deep learning application\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/2-deep-learning-application.png?resize=613%2C360&amp;ssl=1\" data-width=\"613\" data-height=\"360\" data-css=\"tve-u-1741e72404d\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">deep learning applications<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element tve-froala fr-box fr-basic\">\n<ul class=\"\">\n<li>\n<strong>Auto Image Captioning<\/strong><\/p>\n<ul>\n<li>Automatic image captioning is the task were given an image the model is able to generate a caption that describes the contents of the given image.<\/li>\n<\/ul>\n<\/li>\n<li>\u00a0 <strong>Self-driving cars<\/strong>\n<ul>\n<li>This is one of the greatest inventions which the car can go, drive without a driver. It is able to distinguish different types of objects, road signals, peoples, etc, and drives without human intervention. Many companies are building these types of cars using deep learning.<\/li>\n<\/ul>\n<\/li>\n<li>\u00a0<strong>Healthcare Sector<\/strong>\n<ul>\n<li>Deep learning is also widely used in medical fields that are able to assist the patients. Able to classify the diseases, segment the images, etc. It is able to predict human health conditions in the future.\u00a0<\/li>\n<\/ul>\n<\/li>\n<li>\u00a0<strong>Voice assistant<\/strong>\n<ul>\n<li>Your favorite voice assistant uses deep learning every time it\u2019s used. Siri for example uses deep learning to both recognize your voice and \u201clearn\u201d based on your queries.\u00a0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>The biggest challenging problem with deep learning is creating a more generalized model that can outperform well on unseen data or new data. It has a very high probability that the model may get overfitted to training data.<\/p>\n<p dir=\"ltr\">If you haven\u2019t heard about overfitting and don&#8217;t know how to handle overfitting don\u2019t worry. In the next couple of sections of this article, we are going to explain it in detail.<\/p>\n<h2 id=\"t-1598238280895\" class=\"\">Different issues with deep learning models<\/h2>\n<p dir=\"ltr\">In general, once we complete <a href=\"https:\/\/dataaspirant.com\/implement-multinomial-logistic-regression-python\/\" target=\"_blank\" class=\"tve-froala\" rel=\"noopener noreferrer\">model building in machine learning<\/a> or deep learning. The build models face some common issues, it\u2019s worth investing the issues before we deploy the model in the production environment. The two common issues are\u00a0<\/p>\n<p dir=\"ltr\">In this article, we are focusing only on <strong>how to handle the overfitting<\/strong> issue while building deep learning models.\u00a0<\/p>\n<p dir=\"ltr\">Before we learn the difference between these modeling issues and how to handle them, we need to know about <strong>bias and variance<\/strong>.<\/p>\n<h3 id=\"t-1598238280896\" class=\"\">Bias<\/h3>\n<p dir=\"ltr\">It is simply how far our predicted value is with respect to the actual value. We have two different types in bias, they are:<\/p>\n<ul class=\"\">\n<li class=\"dir=\">\n<strong>Low Bias: <\/strong>Suggests less far from the actual target value<\/li>\n<li class=\"dir=\">\n<strong>High-Bias:<\/strong> Suggests more far from the actual target value.<\/li>\n<\/ul>\n<h3 id=\"t-1598238280897\" class=\"\">Variance<\/h3>\n<p dir=\"ltr\">Variance means when a model performs well on train data during training and does not generalize on the new data.\u00a0 It is simply the error rate of the test data. How much it is varying the performance\/accuracy on training and testing.\u00a0<\/p>\n<p dir=\"ltr\">We have two different types of invariance, they are:<\/p>\n<ul class=\"\">\n<li class=\"dir=\">\n<strong>Low variance:<\/strong> shows less difference in test accuracy with respect to train accuracy.<\/li>\n<li class=\"dir=\">\n<strong>High-variance: <\/strong>shows a high difference in test accuracy with respect to train accuracy.<\/li>\n<\/ul>\n<h3 id=\"t-1598238280898\" class=\"\">Bias variance tradeoff\u00a0<\/h3>\n<p dir=\"ltr\">Finding the right balance between bias and variance of the model is called the <strong>Bias-variance tradeoff<\/strong>. If our model is too simple and has very few parameters then it may have high bias and low variance.\u00a0<\/p>\n<p dir=\"ltr\">On the other hand, if our model has a large number of parameters then it\u2019s going to have high variance and low bias. So we need to find a <strong>good balance<\/strong> without overfitting and underfitting the data.<\/p>\n<p dir=\"ltr\">You can clearly see the picture to know more<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e7651b5\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/3-Bias-Variance-tradeoff.png?resize=613%2C543&amp;ssl=1\" class=\"tve_image wp-image-5100\" alt=\"Bias Variance tradeoff\" data-id=\"5100\" width=\"613\" data-init-width=\"1552\" height=\"543\" data-init-height=\"1374\" title=\"Bias Variance tradeoff\" loading=\"lazy\" data-width=\"613\" data-height=\"543\" data-css=\"tve-u-1741e7665ea\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5100\" alt=\"Bias Variance tradeoff\" data-id=\"5100\" width=\"613\" data-init-width=\"1552\" height=\"543\" data-init-height=\"1374\" title=\"Bias Variance tradeoff\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/3-Bias-Variance-tradeoff.png?resize=613%2C543&amp;ssl=1\" data-width=\"613\" data-height=\"543\" data-css=\"tve-u-1741e7665ea\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Bias Variance tradeoff<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">From the <strong>diagram<\/strong> we have to know a few things;<\/p>\n<ol class=\"\">\n<li>Low bias &amp; Low variance &#8212;&#8212;-&gt; <strong>Good model<\/strong>\n<\/li>\n<li>Low bias &amp; High Variance &#8212;&#8212;-&gt; <strong>Overfitted model<\/strong>\n<\/li>\n<li>High bias &amp; Low variance &#8212;&#8212;&gt; <strong>Under fitted model<\/strong>\n<\/li>\n<\/ol>\n<p dir=\"ltr\">By now we know all the pieces to learn about underfitting and overfitting, Let\u2019s jump to learn that.<\/p>\n<h3 class=\"\" id=\"t-1598238280900\">What is Underfitting<\/h3>\n<p dir=\"ltr\">If the model shows high bias on both train and test data is said to be under the fitted model. In simple terms, the model fails to capture the underlying trend of the data. It gives a <a href=\"https:\/\/dataaspirant.com\/confusion-matrix-sklearn-python\/\" target=\"_blank\" rel=\"noopener noreferrer\">poor performance<\/a> on both training and testing data.<\/p>\n<p dir=\"ltr\">As we said earlier In this article, we are focusing <strong>only<\/strong> on dealing with overfitting issues.<\/p>\n<h3 class=\"\" id=\"t-1598238280901\">What is Overfitting<\/h3>\n<p dir=\"ltr\">If the model shows low bias with training data and high variance with test data seems to be Overfitted. In simple terms, a model is overfitted if it tries to learn data and noise too much in training that it negatively shows the performance of the model on unseen data.<\/p>\n<p dir=\"ltr\">The problem with overfitting the model gives high accuracy on training data that performs very poorly on new data (shows high variance).<\/p>\n<h3 id=\"t-1598238280899\" class=\"\">Overfitting example<\/h3>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e78ef77\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/4-Overfitting-on-regression-model.png?resize=613%2C583&amp;ssl=1\" class=\"tve_image wp-image-5104\" alt=\"Overfitting on regression model\" data-id=\"5104\" width=\"613\" data-init-width=\"1716\" height=\"583\" data-init-height=\"1632\" title=\"Overfitting on regression model\" loading=\"lazy\" data-width=\"613\" data-height=\"583\" data-css=\"tve-u-1741e7908fa\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5104\" alt=\"Overfitting on regression model\" data-id=\"5104\" width=\"613\" data-init-width=\"1716\" height=\"583\" data-init-height=\"1632\" title=\"Overfitting on regression model\" loading=\"lazy\" src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/4-Overfitting-on-regression-model.png?resize=613%2C583&amp;ssl=1\" data-width=\"613\" data-height=\"583\" data-css=\"tve-u-1741e7908fa\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Overfitting on regression model<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element tve-froala fr-box fr-basic\">\n<p dir=\"ltr\">We can clearly see how complex the model was, it tries to learn each and every data point in <strong>training<\/strong> and fails to generalize on <strong>unseen\/test<\/strong> data.<\/p>\n<p dir=\"ltr\">The above example showcaes the overfitting in <a href=\"https:\/\/dataaspirant.com\/linear-regression-implementation-in-python\/\" target=\"_blank\" rel=\"noopener noreferrer\">regression kind of models<\/a>.\u00a0<\/p>\n<p dir=\"ltr\">How about classification problem? In <a href=\"https:\/\/dataaspirant.com\/random-forest-classifier-python-scikit-learn\/\" target=\"_blank\" class=\"tve-froala\" rel=\"noopener noreferrer\">classification models<\/a> we check the train and test accuracy to say a model is overfitted or not.<\/p>\n<p dir=\"ltr\">Have a look at the below classification model results on train and test set in below table<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e7d767c\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/5-Overfitting-on-classification-model.png?resize=613%2C272&amp;ssl=1\" class=\"tve_image wp-image-5108\" alt=\"Overfitting on classification model\" data-id=\"5108\" width=\"613\" data-init-width=\"1880\" height=\"272\" data-init-height=\"836\" title=\"Overfitting on classification model\" loading=\"lazy\" data-width=\"613\" data-height=\"272\" data-css=\"tve-u-1741e7d830d\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5108\" alt=\"Overfitting on classification model\" data-id=\"5108\" width=\"613\" data-init-width=\"1880\" height=\"272\" data-init-height=\"836\" title=\"Overfitting on classification model\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/5-Overfitting-on-classification-model.png?resize=613%2C272&amp;ssl=1\" data-width=\"613\" data-height=\"272\" data-css=\"tve-u-1741e7d830d\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Overfitting on classification model<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">We can clearly see the model performing well on training data and unable to perform well on test data.\u00a0<\/p>\n<p dir=\"ltr\">You can also see loss difference in \u00a0graphical representation<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e800f5a\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/6-Train-error-Vs-Test-error.png?resize=613%2C373&amp;ssl=1\" class=\"tve_image wp-image-5111\" alt=\"Train error Vs Test error\" data-id=\"5111\" width=\"613\" data-init-width=\"1738\" height=\"373\" data-init-height=\"1058\" title=\"Train error Vs Test error\" loading=\"lazy\" data-width=\"613\" data-height=\"373\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5111\" alt=\"Train error Vs Test error\" data-id=\"5111\" width=\"613\" data-init-width=\"1738\" height=\"373\" data-init-height=\"1058\" title=\"Train error Vs Test error\" loading=\"lazy\" src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/6-Train-error-Vs-Test-error.png?resize=613%2C373&amp;ssl=1\" data-width=\"613\" data-height=\"373\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Train error Vs Test error<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h2 id=\"t-1598238280902\" class=\"\">Model with overfitting issue<\/h2>\n<p dir=\"ltr\">Now we are going to build a deep learning model which suffers from overfitting issue. Later we will apply <strong>different techniques<\/strong> to handle the overfitting issue.\u00a0<\/p>\n<p dir=\"ltr\">We are going to learn how to apply these techniques, then we will build the same model to show how we improve the deep learning model performance.<\/p>\n<p dir=\"ltr\">Before that let\u2019s quickly see the synopsis of the model flow.<\/p>\n<h3 id=\"t-1598238280903\" class=\"\">Synopsis of the model we are going to build<\/h3>\n<p dir=\"ltr\">Before we are going to handle overfitting, we need to create a Base model\u00a0<\/p>\n<ul class=\"\">\n<li>First, we are going to create a base model in order to showcase the overfitting<\/li>\n<li>In order to create a model and showcase the example, first, we need to create data. we are going to create data by using <strong>make_moons() <\/strong>function.<\/li>\n<li>Then we fit a very basic model (without applying any techniques) on newly created data points<\/li>\n<li>Then we will walk you through the different techniques to handle overfitting issues with example codes and graphs.<\/li>\n<\/ul>\n<h3 id=\"t-1598238280904\" class=\"\">Data preparation<\/h3>\n<p dir=\"ltr\">The <strong>make_moons()<\/strong> function is for binary classification and will generate a <strong>swirl pattern<\/strong>, or two moons<\/p>\n<p dir=\"ltr\"><strong>parameters:<\/strong><\/p>\n<ul class=\"\">\n<li>\n<em>n_samples &#8211; int:<\/em> the total number of points generated optional (default=100)<\/li>\n<li>\n<em>shuffle- bool:<\/em> whether to shuffle the samples.optional (default=True)<\/li>\n<li>\n<em>noise- double or None:<\/em> the standard deviation of Gaussian noise added to the data (default=None)<\/li>\n<li>\n<em>random_state- int:<\/em> RandomState instance, default=None<\/li>\n<\/ul>\n<p dir=\"ltr\"><strong>Returns:<\/strong><\/p>\n<ul class=\"\">\n<li>\n<em>Xarray<\/em> of shape [n_samples, 2]<\/li>\n<li>\n<em>Y array<\/em> of shape [n_samples], the integer labels (0 or 1) for class membership of each sample<\/li>\n<\/ul>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e9068f0\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/7-deep-learing-model-data.png?resize=613%2C403&amp;ssl=1\" class=\"tve_image wp-image-5117\" alt=\"deep learning model data\" data-id=\"5117\" width=\"613\" data-init-width=\"848\" height=\"403\" data-init-height=\"558\" title=\"deep learning model data\" loading=\"lazy\" data-width=\"613\" data-height=\"403\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5117\" alt=\"deep learning model data\" data-id=\"5117\" width=\"613\" data-init-width=\"848\" height=\"403\" data-init-height=\"558\" title=\"deep learning model data\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/7-deep-learing-model-data.png?resize=613%2C403&amp;ssl=1\" data-width=\"613\" data-height=\"403\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">deep learning model data<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h3 id=\"t-1598240424987\" class=\"\">Model Creation<\/h3>\n<p dir=\"ltr\">Here, we are creating a <strong>sequential model<\/strong> with two layers, with<strong> binary_crossentropy<\/strong> loss.<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h3 id=\"t-1598241082954\" class=\"\">Model Evaluation<\/h3>\n<p dir=\"ltr\">Let\u2019s see both training and <strong>validation loss<\/strong> in graphical representation.<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e9c1128\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/8-train-test-loss-graph.png?resize=613%2C401&amp;ssl=1\" class=\"tve_image wp-image-5124\" alt=\"train test loss graph\" data-id=\"5124\" width=\"613\" data-init-width=\"798\" height=\"401\" data-init-height=\"522\" title=\"train test loss graph\" loading=\"lazy\" data-width=\"613\" data-height=\"401\" data-css=\"tve-u-1741e9c31bd\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5124\" alt=\"train test loss graph\" data-id=\"5124\" width=\"613\" data-init-width=\"798\" height=\"401\" data-init-height=\"522\" title=\"train test loss graph\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/8-train-test-loss-graph.png?resize=613%2C401&amp;ssl=1\" data-width=\"613\" data-height=\"401\" data-css=\"tve-u-1741e9c31bd\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"wp-caption-text thrv-inline-text\">Train and Test loss<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">We can clearly see that it is showing <strong>high variance<\/strong> according to test data.<\/p>\n<p dir=\"ltr\">By now you know the above build deep learning model having the overfitting issue. Now let\u2019s learn how to handle such overfitting issues with different techniques. <\/p>\n<h2 id=\"t-1598241082955\" class=\"\">Techniques to Handle Overfitting In Deep Learning<\/h2>\n<p dir=\"ltr\">For handling overfitting problems, we can use any of the below techniques, but we should be aware of how and when we should use these techniques. <\/p>\n<p dir=\"ltr\">Let\u2019s learn about these techniques one by one.<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741e9e1c7e\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/7-Techniques-to-handle-overfitting-in-deep-learning.png?resize=613%2C300&amp;ssl=1\" class=\"tve_image wp-image-5127\" alt=\"Techniques to handle overfitting in deep learning\" data-id=\"5127\" width=\"613\" data-init-width=\"2746\" height=\"300\" data-init-height=\"1346\" title=\"Techniques to handle overfitting in deep learning\" loading=\"lazy\" data-width=\"613\" data-height=\"300\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5127\" alt=\"Techniques to handle overfitting in deep learning\" data-id=\"5127\" width=\"613\" data-init-width=\"2746\" height=\"300\" data-init-height=\"1346\" title=\"Techniques to handle overfitting in deep learning\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/7-Techniques-to-handle-overfitting-in-deep-learning.png?resize=613%2C300&amp;ssl=1\" data-width=\"613\" data-height=\"300\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Techniques to handle overfitting in deep learning<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<ul class=\"\">\n<li>Regularization<\/li>\n<li>Dropout<\/li>\n<li>Data Augmentation<\/li>\n<li>Early stopping<\/li>\n<\/ul>\n<h3 id=\"t-1598241082956\" class=\"\">Regularization<\/h3>\n<p dir=\"ltr\">Regularization is one of the best techniques to avoid overfitting. It can be done by simply adding a penalty to the loss function with respect to the size of the weights in the model. By adding regularization to neural networks it may not be the best model on training but it is able to outperform well on unseen data.\u00a0<\/p>\n<p dir=\"ltr\">You can see the example below:<\/p>\n<h4 id=\"t-1598241082957\" class=\"\">Regularized model<\/h4>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">In the above code, we are\u00a0<\/p>\n<ul class=\"\">\n<li>Creating an instance of <strong>Sequential<\/strong> class<\/li>\n<li>Adding the input layer with <strong>2 input<\/strong> dimensions,<strong>500<\/strong> neurons, relu activation function, and L2 kernel regularizer<\/li>\n<li>Adding the output layer with <strong>1<\/strong> neuron, sigmoid activation function, and <strong>L2<\/strong> kernel regularizer<\/li>\n<li>Compile the model with <strong>\u2018binary_crossentrophy\u2019<\/strong> loss, <strong>adam<\/strong> optimizer and accuracy metric<\/li>\n<li>Finally fit the model on both training and validation data with <strong>4000<\/strong> epochs.<\/li>\n<\/ul>\n<h4 class=\"\" id=\"t-1598245563542\">Model Evaluation<\/h4>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741ee203c6\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/9-Regularization-model-train-and-test-loss.png?resize=613%2C376&amp;ssl=1\" class=\"tve_image wp-image-5134\" alt=\"Regularization model train and test loss\" data-id=\"5134\" width=\"613\" data-init-width=\"838\" height=\"376\" data-init-height=\"514\" title=\"Regularization model train and test loss\" loading=\"lazy\" data-width=\"613\" data-height=\"376\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5134\" alt=\"Regularization model train and test loss\" data-id=\"5134\" width=\"613\" data-init-width=\"838\" height=\"376\" data-init-height=\"514\" title=\"Regularization model train and test loss\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/9-Regularization-model-train-and-test-loss.png?resize=613%2C376&amp;ssl=1\" data-width=\"613\" data-height=\"376\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Regularization model train and test loss<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">We can see that the model is not showing high variance with respect to test data. By adding regularization we are able to make our model more generalized.<\/p>\n<h3 id=\"t-1598245563543\" class=\"\">Dropout<\/h3>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741ee312e1\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/8-Deep-learning-dropout.png?resize=613%2C314&amp;ssl=1\" class=\"tve_image wp-image-5137\" alt=\"Deep learning dropout\" data-id=\"5137\" width=\"613\" data-init-width=\"2226\" height=\"314\" data-init-height=\"1142\" title=\"Deep learning dropout\" loading=\"lazy\" data-width=\"613\" data-height=\"314\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5137\" alt=\"Deep learning dropout\" data-id=\"5137\" width=\"613\" data-init-width=\"2226\" height=\"314\" data-init-height=\"1142\" title=\"Deep learning dropout\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/8-Deep-learning-dropout.png?resize=613%2C314&amp;ssl=1\" data-width=\"613\" data-height=\"314\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Deep learning dropout<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">Dropout is simply dropping the neurons in neural networks. During training a deep learning model, it drops some of its neurons and trains on rest. It updates the weights of only selected or activated neurons and others remain constant.\u00a0<\/p>\n<p dir=\"ltr\">For every next\/new epoch again it selects some nodes randomly based on the dropout ratio and keeps the rest of the neurons deactivated. It helps to create a more robust model that is able to perform well on unseen data.<\/p>\n<p dir=\"ltr\">\u00a0You can see the example below<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">In the above code, we are<\/p>\n<ul class=\"\">\n<li>Creating an instance of Sequential class<\/li>\n<li>Adding an input layer with 2 input dimensions ,500 neurons,relu activation function and 0.5 <strong>dropout ratio<\/strong>.<\/li>\n<li>Adding a hidden layer with 128 hidden neurons,relu activation function, and <strong>0.25<\/strong> dropout ratio.<\/li>\n<li>Adding the output layer with 1 neuron and sigmoid activation function<\/li>\n<li>Compile the model with <strong>\u2018binary_crossentrophy\u2019<\/strong> loss, adam optimizer and accuracy metric<\/li>\n<li>Finally fit the model on both training and validation data with<strong> 500<\/strong> epochs.<\/li>\n<\/ul>\n<h4 id=\"t-1598245563544\" class=\"\">Model Evaluation<\/h4>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h3 id=\"t-1598245563545\" class=\"\">Data Augmentation<\/h3>\n<p dir=\"ltr\">We can prevent the model from being overfitted by training the model on more numbers of examples. \u00a0We can increase the size of the data by applying some minor changes in the data.\u00a0<\/p>\n<p dir=\"ltr\">Examples:\u00a0<\/p>\n<ul class=\"\">\n<li>Translations,\u00a0<\/li>\n<li>Rotations,\u00a0<\/li>\n<li>Changes in scale,\u00a0<\/li>\n<li>Shearing,\u00a0<\/li>\n<li>Horizontal (and in some cases, vertical) flips. \u00a0<\/li>\n<\/ul>\n<p dir=\"ltr\">This technique mostly used for only CNN\u2019s<\/p>\n<h4 class=\"\">Data Augmentation code snippet<\/h4>\n<p dir=\"ltr\">In order to generate the data, we have a method called ImageDataGenerator which is available in Keras library. <\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p>You can see the demo of <strong>Data Augmentation<\/strong> below<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741f02a7b3\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/data-augmentation-example.png?resize=613%2C270&amp;ssl=1\" class=\"tve_image wp-image-5145\" alt=\"data augmentation example\" data-id=\"5145\" width=\"613\" data-init-width=\"1210\" height=\"270\" data-init-height=\"534\" title=\"data augmentation example\" loading=\"lazy\" data-width=\"613\" data-height=\"270\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5145\" alt=\"data augmentation example\" data-id=\"5145\" width=\"613\" data-init-width=\"1210\" height=\"270\" data-init-height=\"534\" title=\"data augmentation example\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/data-augmentation-example.png?resize=613%2C270&amp;ssl=1\" data-width=\"613\" data-height=\"270\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">data augmentation example<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h3 id=\"t-1598245563546\" class=\"\">Early Stopping<\/h3>\n<p dir=\"ltr\">It is one of the most universally used techniques in which we can smartly overcome the overfitting in deep learning. Too many epochs can lead to overfitting of the training dataset. In a way this a smar way to handle overfitting.<\/p>\n<p dir=\"ltr\">Early stopping is a technique that monitors the <a href=\"https:\/\/dataaspirant.com\/six-popular-classification-evaluation-metrics-in-machine-learning\/\" target=\"_blank\" rel=\"noopener noreferrer\">model performance<\/a> on validation or test set based on a given metric and stops training when performance decreases.<\/p>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741f057c33\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/early-stopping-graph.png?resize=613%2C327&amp;ssl=1\" class=\"tve_image wp-image-5148\" alt=\"early stopping graph\" data-id=\"5148\" width=\"613\" data-init-width=\"1152\" height=\"327\" data-init-height=\"614\" title=\"early stopping graph\" loading=\"lazy\" data-width=\"613\" data-height=\"327\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5148\" alt=\"early stopping graph\" data-id=\"5148\" width=\"613\" data-init-width=\"1152\" height=\"327\" data-init-height=\"614\" title=\"early stopping graph\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/early-stopping-graph.png?resize=613%2C327&amp;ssl=1\" data-width=\"613\" data-height=\"327\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Early stopping graph<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">You can find the example below<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<p dir=\"ltr\">In the above code, we are\u00a0<\/p>\n<ul class=\"\">\n<li>Creating an instance of Sequential class.<\/li>\n<li>Adding an input layer with 2 input dimensions,<strong>128<\/strong> neurons, and relu activation function.<\/li>\n<li>Adding the output layer with 1 neuron and\u00a0 sigmoid activation function<\/li>\n<li>Compile the model with <strong>\u2018binary_crossentrophy\u2019<\/strong> loss, <strong>adam optimizer<\/strong> and accuracy metric<\/li>\n<li>Creating a <strong>callback<\/strong> which can keep on monitor the <strong>\u2018val_loss\u2019<\/strong>, helps to stop the epochs when \u00a0val_loss \u00a0increases.<\/li>\n<li>Finally fit the model on both training and validation data with <strong>2000<\/strong> epochs and defined callbacks.<\/li>\n<\/ul>\n<h4 id=\"t-1598245563547\" class=\"\">Model Evaluation<\/h4>\n<\/div>\n<div class=\"thrv_wrapper tve_image_caption\" data-css=\"tve-u-1741f33a774\">\n<span class=\"tve_image_frame\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/early-stopping-error-graph.png?resize=613%2C397&amp;ssl=1\" class=\"tve_image wp-image-5155\" alt=\"early stopping error graph\" data-id=\"5155\" width=\"613\" data-init-width=\"782\" height=\"397\" data-init-height=\"506\" title=\"early stopping error graph\" loading=\"lazy\" data-width=\"613\" data-height=\"397\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5155\" alt=\"early stopping error graph\" data-id=\"5155\" width=\"613\" data-init-width=\"782\" height=\"397\" data-init-height=\"506\" title=\"early stopping error graph\" loading=\"lazy\" src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/early-stopping-error-graph.png?resize=613%2C397&amp;ssl=1\" data-width=\"613\" data-height=\"397\" data-recalc-dims=\"1\"><\/span><\/p>\n<p class=\"thrv-inline-text wp-caption-text\">Early stopping error graph<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h2 class=\"\" id=\"t-1598245563556\">Complete Code<\/h2>\n<p>Below is the complete code used in this aricle. You can also fork this code in our <a href=\"https:\/\/github.com\/saimadhu-polamuri\/DataAspirant_codes\/tree\/master\/overfitting-deep-learning\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub<\/a> repository.<\/p>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h2 id=\"t-1598245563548\" class=\"\">Conclusion<\/h2>\n<p dir=\"ltr\">Each technique approaches the problem differently and tries to create a model more generalized and robust to perform well on new data. We have different types of techniques to avoid overfitting, you can also use all of these techniques in one model. <\/p>\n<p dir=\"ltr\">Don&#8217;t limit youself to consider only these techniques for handle overfitting, you can try other new and advanced techniques to handle overfitting while building deep learning models.<\/p>\n<p dir=\"ltr\">We can&#8217;t say which technique is better, try to use all of the techniques and select the best according to your data.<\/p>\n<h3 id=\"t-1598245563549\" class=\"\">Suggestions<\/h3>\n<ul class=\"\">\n<li>\n<strong>Classical approach:<\/strong> use early stopping and L2 regularization<\/li>\n<li>\n<strong>The modern approach: <\/strong>use early stopping and dropout, in addition to regularization.<\/li>\n<\/ul>\n<h4 id=\"t-1598245563550\" class=\"\">Recommended Deep Learning courses<\/h4>\n<\/div>\n<div class=\"thrv_wrapper thrv-page-section thrv-lp-block\" data-inherit-lp-settings=\"1\" data-css=\"tve-u-1741f3a94e5\" data-keep-css_id=\"1\">\n<div class=\"tve-page-section-in tve_empty_dropzone  \" data-css=\"tve-u-1741f3a977a\">\n<div class=\"thrv_wrapper thrv-columns dynamic-group-kbt3q0q7\" data-css=\"tve-u-1741f3a94e8\">\n<div class=\"tcb-flex-row v-2 tcb--cols--3 tcb-medium-no-wrap tcb-mobile-wrap m-edit\" data-css=\"tve-u-1741f3a94e9\">\n<div class=\"tcb-flex-col\">\n<div class=\"tcb-col dynamic-group-kbt3pyfd\" data-css=\"tve-u-1741f3a94ea\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbt3pwhk\" data-css=\"tve-u-1741f3a94eb\">\n<div class=\"tve-cb\">\n<div class=\"thrv_wrapper tve_image_caption dynamic-group-kbt3pu4z\" data-css=\"tve-u-1741f3a94f6\"><span class=\"tve_image_frame\"><a href=\"https:\/\/dataaspirant.com\/recommends\/ds-courses\/coursera-deep-learning-specialisation\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/deeplearning-coursera.jpeg?resize=172%2C172&amp;ssl=1\" class=\"tve_image wp-image-5165\" alt=\"Deep Learning Coursera\" data-id=\"5165\" width=\"172\" data-init-width=\"300\" height=\"172\" data-init-height=\"300\" title=\"deeplearning coursera\" loading=\"lazy\" data-width=\"172\" data-height=\"172\" data-css=\"tve-u-1741f3a94f7\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5165\" alt=\"Deep Learning Coursera\" data-id=\"5165\" width=\"172\" data-init-width=\"300\" height=\"172\" data-init-height=\"300\" title=\"deeplearning coursera\" loading=\"lazy\" src=\"https:\/\/i1.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/deeplearning-coursera.jpeg?resize=172%2C172&amp;ssl=1\" data-width=\"172\" data-height=\"172\" data-css=\"tve-u-1741f3a94f7\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><\/a><span class=\"tve-image-overlay\"><\/span><\/span><\/div>\n<h4 class=\"\" data-css=\"tve-u-1741f3a94f9\" id=\"t-1598245563551\">Deep Learning <\/h4>\n<h4 class=\"\" data-css=\"tve-u-1741f3a94f9\" id=\"t-1598245563554\">Specializations<\/h4>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tcb-flex-col\">\n<div class=\"tcb-col dynamic-group-kbt3pyfd\" data-css=\"tve-u-1741f3a94ea\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbt3pwhk\" data-css=\"tve-u-1741f3a9505\">\n<div class=\"tve-cb\">\n<div class=\"thrv_wrapper tve_image_caption dynamic-group-kbt3pu4z\" data-css=\"tve-u-1741f3a9506\"><span class=\"tve_image_frame\"><a href=\"https:\/\/dataaspirant.com\/recommends\/ds-courses\/udemy-deep-learning-course\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/deeplearning-course.jpg?resize=172%2C172&amp;ssl=1\" class=\"tve_image wp-image-5170\" alt=\"Deep Learning python\" data-id=\"5170\" width=\"172\" data-init-width=\"150\" height=\"172\" data-init-height=\"150\" title=\"deeplearning-course\" loading=\"lazy\" data-width=\"172\" data-height=\"172\" data-css=\"tve-u-1741f3a9507\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5170\" alt=\"Deep Learning python\" data-id=\"5170\" width=\"172\" data-init-width=\"150\" height=\"172\" data-init-height=\"150\" title=\"deeplearning-course\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/deeplearning-course.jpg?resize=172%2C172&amp;ssl=1\" data-width=\"172\" data-height=\"172\" data-css=\"tve-u-1741f3a9507\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><\/a><span class=\"tve-image-overlay\"><\/span><\/span><\/div>\n<h4 class=\"\" data-css=\"tve-u-1741f3a9509\" id=\"t-1598245563552\">Deep Learning A to Z Python Course<\/h4>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tcb-flex-col\">\n<div class=\"tcb-col dynamic-group-kbt3pyfd\" data-css=\"tve-u-1741f3a94ea\">\n<div class=\"thrv_wrapper thrv_contentbox_shortcode thrv-content-box tve-elem-default-pad dynamic-group-kbt3pwhk\" data-css=\"tve-u-1741f3a9514\">\n<div class=\"tve-cb\">\n<div class=\"thrv_wrapper tve_image_caption dynamic-group-kbt3pu4z\" data-css=\"tve-u-1741f3a9515\"><span class=\"tve_image_frame\"><a href=\"https:\/\/dataaspirant.com\/recommends\/ds-courses\/udemy-deeplearning-tensorflow\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img src=\"https:\/\/i2.wp.com\/dataaspirant.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif?ssl=1\" data-lazy-src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/tensorflow-course.png?resize=172%2C172&amp;ssl=1\" class=\"tve_image wp-image-5175\" alt=\"Tensorflow Course\" data-id=\"5175\" width=\"172\" data-init-width=\"150\" height=\"172\" data-init-height=\"150\" title=\"tensorflow course\" loading=\"lazy\" data-width=\"172\" data-height=\"172\" data-css=\"tve-u-1741f3a9516\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><img class=\"tve_image wp-image-5175\" alt=\"Tensorflow Course\" data-id=\"5175\" width=\"172\" data-init-width=\"150\" height=\"172\" data-init-height=\"150\" title=\"tensorflow course\" loading=\"lazy\" src=\"https:\/\/i0.wp.com\/dataaspirant.com\/wp-content\/uploads\/2020\/08\/tensorflow-course.png?resize=172%2C172&amp;ssl=1\" data-width=\"172\" data-height=\"172\" data-css=\"tve-u-1741f3a9516\" data-link-wrap=\"true\" data-recalc-dims=\"1\"><\/a><span class=\"tve-image-overlay\"><\/span><\/span><\/div>\n<h4 class=\"\" data-css=\"tve-u-1741f3a9518\" id=\"t-1598245563553\">Deep Learning With Tensorflow<\/h4>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/dataaspirant.com\/handle-overfitting-deep-learning-models\/<\/p>\n","protected":false},"author":0,"featured_media":652,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts\/651"}],"collection":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/comments?post=651"}],"version-history":[{"count":0,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/posts\/651\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/media\/652"}],"wp:attachment":[{"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/media?parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/categories?post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wealthrevelation.com\/data-science\/wp-json\/wp\/v2\/tags?post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}