Deep learning specialization notes

A couple of months back I have completed Deep Learning Specialization taught by AI guru Andrew NG. During the learning process, I have made personal notes from all the 5 courses.  Notes are based on lecture video and supplementary material provided and my own understanding of the topic. I have used lots of diagrams and code snippets which I made from course videos and slides. I am fully complying with The Honor Code. No programming assignment and solutions are published on GitHub or any other site.

Please note that most of the places I am not using exact mathematical symbol and other notation, instead using plain English name this is just to save some time, also please note that this is a personal diary made during course and I guess a bit longer too and few places not very well organized, so in any form doesn’t replace the content and learning process one follows during course which includes quizzes, programming assignments, project etc. This is a great course so I encourage you to enroll.

What you will learn at the end of the specialization:

Neural Networks and Deep Learning: This course gives foundations of neural networks and deep learning. How to build and train. At the end of this course, we’ll in position to recognize cat so will make a cat recognizer.  [PDF]

Improving Deep Neural Networks – Hyperparameter Tuning, Regularization and Optimization: In this course, we’ll learn about practical aspects of the NN. Now you have made NN/deep network so the focus is on how to make it perform well. We’ll fine tune various things like hyperparamater tuning, regularization algorithms and optimization algorithms like RMSProp, Adam etc. So this course helps greatly in making model perform well.  [PDF]

Structuring your Machine Learning Project: In this course, we’ll learn how to structure machine learning projects. It is observed that strategy for machine learning projects has been changed a lot in deep learning era. For example, the way you divide data in train/test/dev set has been changed in the era of deep learning also whether train and test data comes from the same distributions etc.? we’ll also learn about end-to-end deep learning. The material in this course is relatively unique.  [PDF]

Convolutional Neural Networks(CNN): CNN is often applied in images mainly in computer vision problems. In this course, we’ll learn about how to make these models using CNN’s.  [PDF]

Natural Language Processing-Building Sequence Models: In this course, we’ll learn about algorithms like Recurrent Neural Network (RNN’s), LSTM (Long Short-Term Memory) and learn how to apply them with the sequence of data like natural language processing, speech recognition, music generation etc.  [PDF]


Happy learning!

Pl, drop a note in case of any feedback.



Deep Learning Specialization:

Github (Source code and diagrams used in notes):

Deep learning Specialization completion certificate:


Choropleth Maps in Python

Choropleth maps are a great way to represent geographical data. I have done a basic implementation of two different data sets. I have used jupyter notebook to show the plots.

World Power Consumption 2014

First do Plotly imports

import plotly.graph_objs as go
from plotly.offline import init_notebook_mode,iplot

Next step is to fetch the dataset, we’ll use Python pandas library to read the read the csv file

import pandas as pd
df = pd.read_csv('2014_World_Power_Consumption')

Next, we need to create data and layout variable which contains a dict

data = dict(type='choropleth',
locations = df['Country'],
locationmode = 'country names', z = df['Power Consumption KWH'],
text = df['Country'], colorbar = {'title':'Power Consumption KWH'},
colorscale = 'Viridis', reversescale = True)

Let’s make a layout

layout = dict(title='2014 World Power Consumption',
geo = dict(showframe=False,projection={'type':'Mercator'}))

Pass the data and layout and plot using iplot

choromap = go.Figure(data = [data],layout = layout)

The output will be be like below:

Check github for full code.

In next post I will try to make a choropleth for a different data set.


Stanford Machine learning class slides

Andrew NG Machine learning class is the best class so far which I took online.

Apart from the course video sometimes lecture slides are also important for quick reference. For quite some time, I was looking for them as they are not available on course home.

Here all the lecture slides available at:




and so on…


My own experience slides only make sense if you go through the full video course.  Professor is an amazing teacher.


Enjoy learning.