
This course highlights two pillars of modern deep learning: algorithmic techniques to improve neural networks and hardware-driven tooling with GPUs and libraries like TensorFlow and PyTorch.
Explore how neural networks extend logistic regression with hidden units, weight matrices and biases, activations, softmax outputs, and gradient descent training with regularization to improve generalization.
engage in a hands-on exercise from theory to code, applying logistic regression on Mnist dataset in Python with numpy, pandas, matplotlib, including loading data, flattening 28x28 images, loss plotting.
Explore loading mnist data using pandas, converting to numpy, and creating train and test sets. Apply standardization based on the training data, handle zero variance safely, and normalize both sets.
We implement logistic regression on MNIST, loading and normalizing data, converting labels to indicator matrices, and training a softmax classifier with cross-entropy against a single-neuron benchmark.
Explore how to optimize neural networks with batch, mini-batch, and stochastic gradient descent, using batch size to balance memory, accuracy, and regularization, illustrated with Mnist and ImageNet.
Explore stochastic gradient descent and mini-batch gradient descent in Python, with time-based stopping, tailored learning rates, data shuffling, and performance comparisons to full gradient descent.
How can you use momentum to speed up neural network training and get out of local minima?
Explore a modern improvement to momentum called Nesterov momentum, which peeks ahead to compute the gradient at a look-ahead point before updating velocity and weights.
Compare momentum and non-momentum gradient descent in a multilayer perceptron, showing faster convergence with momentum and Nesterov updates across sigmoid and relu hidden layers.
Learn about periodic decay of learning rate, exponential decay, 1/t decay, AdaGrad, and RMSprop.
Compare constant learning rate and rmsprop on the same neural network to show rmsprop enables faster initial convergence and better classification accuracy.
Adam, the adaptive moment estimation optimizer, combines momentum with per-parameter learning rate, making it robust and the default choice for neural network training.
Explore bias-corrected Adam optimization by applying exponential moving averages for M and V, with beta1, beta2, and epsilon, to improve gradient updates in deep learning.
Compare Adam and RMSprop with momentum in code, highlighting bias correction, momentum, and training dynamics in a neural network and the resulting results.
Explore hyperparameter optimization for deep learning using cross-validation and k-fold splits to pick learning rate, momentum, regularization, hidden layer size, and number of hidden layers, via grid or random search.
Learn to sample hyperparameters on a log scale, using uniform log-space sampling for learning rate across powers of ten and RMSProp decay rates like 0.9, 0.99, and 0.999.
examine vanishing and exploding gradients in deep networks and how sigmoid derivatives slow backpropagation. learn how relu enables end-to-end training and why weight initialization prevents gradient blowups.
Reframe the local minima debate by showing saddle points dominate high-dimensional landscapes, and explain that gradient descent rarely hits a true minimum due to exponential probability across axes.
Explore how weight initialization shapes optimization in modern deep learning, treating variance as a tunable hyperparameter and touching on vanishing gradients, exploding gradients, and the local minima view.
Build a neural network in Theano for deep learning in Python, implementing placeholders, Relu and Softmax, a cost function with regularization, and train and predict functions.
Build a neural network in TensorFlow by adding a second hidden layer of 100 units, defining a softmax cross-entropy loss with logits, and training with RMSprop and momentum.
Define graphs as a set of node-edge computations and explain how TensorFlow sessions manage memory and placement, separating fundamentals from boilerplate to build neural networks in Python.
I show you how to start a GPU instance on Amazon Web Services (AWS) and prove to you that training a neural network using Theano on the GPU can be much faster than the CPU.
Learn to set up a GPU-accelerated deep learning stack on a home laptop or desktop, including selecting an Nvidia GPU, installing cuda drivers, and using TensorFlow, PyTorch, and Keras.
Practice building and refining models in piano and TensorFlow by applying a common cost-function and gradient-descent framework to linear, logistic, and neural networks, plus unsupervised models.
Explore Theano vs. TensorFlow, noting both are similar now; later experience with variable length sentences, recursive neural networks, dropout, and word2vec will clarify the best fit.
Transition to the second half of the course and embrace modern deep learning, automatic differentiation, Theano and TensorFlow, and GPU-accelerated training, with dropout.
Ever wondered how AI technologies like OpenAI ChatGPT, GPT-4, DALL-E, Midjourney, and Stable Diffusion really work? In this course, you will learn the foundations of these groundbreaking applications.
This course continues where my first course, Deep Learning in Python, left off. You already know how to build an artificial neural network in Python, and you have a plug-and-play script that you can use for TensorFlow. Neural networks are one of the staples of machine learning, and they are always a top contender in Kaggle contests. If you want to improve your skills with neural networks and deep learning, this is the course for you.
You already learned about backpropagation, but there were a lot of unanswered questions. How can you modify it to improve training speed? In this course you will learn about batch and stochastic gradient descent, two commonly used techniques that allow you to train on just a small sample of the data at each iteration, greatly speeding up training time.
You will also learn about momentum, which can be helpful for carrying you through local minima and prevent you from having to be too conservative with your learning rate. You will also learn about adaptive learning rate techniques like AdaGrad, RMSprop, and Adam which can also help speed up your training.
Because you already know about the fundamentals of neural networks, we are going to talk about more modern techniques, like dropout regularization and batch normalization, which we will implement in both TensorFlow and Theano. The course is constantly being updated and more advanced regularization techniques are coming in the near future.
In my last course, I just wanted to give you a little sneak peak at TensorFlow. In this course we are going to start from the basics so you understand exactly what's going on - what are TensorFlow variables and expressions and how can you use these building blocks to create a neural network? We are also going to look at a library that's been around much longer and is very popular for deep learning - Theano. With this library we will also examine the basic building blocks - variables, expressions, and functions - so that you can build neural networks in Theano with confidence.
Theano was the predecessor to all modern deep learning libraries today. Today, we have almost TOO MANY options. Keras, PyTorch, CNTK (Microsoft), MXNet (Amazon / Apache), etc. In this course, we cover all of these! Pick and choose the one you love best.
Because one of the main advantages of TensorFlow and Theano is the ability to use the GPU to speed up training, I will show you how to set up a GPU-instance on AWS and compare the speed of CPU vs GPU for training a deep neural network.
With all this extra speed, we are going to look at a real dataset - the famous MNIST dataset (images of handwritten digits) and compare against various benchmarks. This is THE dataset researchers look at first when they want to ask the question, "does this thing work?"
These images are important part of deep learning history and are still used for testing today. Every deep learning expert should know them well.
This course focuses on "how to build and understand", not just "how to use". Anyone can learn to use an API in 15 minutes after reading some documentation. It's not about "remembering facts", it's about "seeing for yourself" via experimentation. It will teach you how to visualize what's happening in the model internally. If you want more than just a superficial look at machine learning models, this course is for you.
"If you can't implement it, you don't understand it"
Or as the great physicist Richard Feynman said: "What I cannot create, I do not understand".
My courses are the ONLY courses where you will learn how to implement machine learning algorithms from scratch
Other courses will teach you how to plug in your data into a library, but do you really need help with 3 lines of code?
After doing the same thing with 10 datasets, you realize you didn't learn 10 things. You learned 1 thing, and just repeated the same 3 lines of code 10 times...
Suggested Prerequisites:
Know about gradient descent
Probability and statistics
Python coding: if/else, loops, lists, dicts, sets
Numpy coding: matrix and vector operations, loading a CSV file
Know how to write a neural network with Numpy
WHAT ORDER SHOULD I TAKE YOUR COURSES IN?:
Check out the lecture "Machine Learning and AI Prerequisite Roadmap" (available in the FAQ of any of my courses, including the free Numpy course)