
Explore neural networks from neurons to convolutional and recurrent architectures, learn GANs, reinforcement learning, NLP, and applications like stock prediction, speech recognition, and self-driving tech using PyTorch.
this PyTorch course outlines the curriculum, covering fundamental architectures and time series forecasting, then explores applications like natural language processing, recommender systems, and reinforcement learning using Google Colab.
Ask questions via the Q&A to accelerate learning, as answers typically arrive within 24 hours; meet prerequisites and stay engaged by coding or taking handwritten notes.
Handle 403 errors by downloading the file in a browser and uploading it via Colab's file explorer, then continue using the file in your notebook.
Discover Google Colab as a cloud-based Python notebook that lets you use free GPU or TPU, with preinstalled libraries and easy Google Drive sharing.
Explore how machine learning is essentially a geometry problem, using supervised learning to fit lines or curves for regression and to separate categories for classification with data points and features.
Explore regression basics by fitting a line y hat equals M X plus B to X and y, using mean squared error and gradient descent to find M and B.
Explore how to prepare code for PyTorch linear regression, build the model, define loss and optimizer, perform gradient steps, and handle tensors and data types.
Learn linear regression with a PyTorch model to find the line of best fit from synthetic data. Train with MSE loss and an optimizer, and plot losses to gauge convergence.
Apply Moore's law to real world data by modeling the exponential growth of transistor counts with a log transformation and linear regression, and recognize data normalization caveats.
Load breast cancer data from the cycle learn API, normalize with a standard scaler, split into train and test sets, train a linear classifier with a sigmoid, and evaluate accuracy.
Train a binary classifier for breast cancer with PyTorch, using a train/test split, standardized features, a linear layer with sigmoid, BCE loss, and Adam, monitoring train and test accuracy.
Save a PyTorch model by saving its state dict to a file, then load it later for evaluation, verify performance, and download or share the file from Colab.
Explore how linear regression and logistic regression underlie neural computation, linking weights, bias, and input features to classification and the all-or-nothing neuron model via sigmoid activation.
Explore how models learn from data using linear regression, mean squared error, gradient descent, and learning rate with PyTorch automatic differentiation.
Explore a numerically stable alternative for logistic regression by training a linear model with BCE with logits loss, using the logit output directly instead of a sigmoid.
Split data into train, validation, and test sets to manage generalization and the bias-variance tradeoff. Use cross-validation and validation scores to select models and assess performance on unseen data.
Submit feedback via the suggestion box to improve the PyTorch: deep learning and artificial intelligence course, sharing your background, course you’re taking, difficulty, and missing explanations or future topics.
Introduce feed-forward neural networks, a basic neuron-inspired model. Explore architecture, activation functions, and multi-class classification for processing images and other unstructured data.
Explore forward propagation in neural networks, from single neurons to deep, wide layers, using the sigmoid and matrix notation to learn hierarchical features for classification and regression.
Explore how neural networks transform geometry into nonlinear decision boundaries by learning nonlinear features automatically, via sigmoid-activated hidden layers, without manual feature engineering, using tensor flow playground.
Explore sigmoid and tanh activation functions, their vanishing gradient and zero-centered issues, and evaluate relu and variants like leaky relu, elu, and softplus.
Master multiclass classification in PyTorch using softmax to map activations to category probabilities. Compare cross-entropy loss, binary vs multiclass tasks, and k output nodes for effective deep learning models.
Learn how images are stored as height, width, and rgb color channels in 8-bit or 0–1 float values, and how to flatten to vectors or form 4d tensors for networks.
Load the amnesty handwritten digits dataset from the Torture Vision library, flatten 28x28 grayscale images to 784 features, and train a 784-128-10 ann for multiclass classification with batch gradient descent.
Train a neural network for image classification in PyTorch using torchvision transforms and data loaders. Run on GPU when available and evaluate with cross-entropy loss, accuracy, and a confusion matrix.
Learn how convolution transforms images in neural networks, using input, filter (kernel), and output, with examples like blur and edge detection, and understand padding and valid/same/full modes.
Explore how convolution acts as a sliding pattern finder, using dot products and cosine similarity to detect patterns in images through cross-correlation.
Explore the equivalence of convolution and matrix multiplication, reveal weight sharing to reduce parameters, and explain translational invariance for image feature detection.
Extend convolution to color images using three-dimensional filters that scan height, width, and color channels to produce stacked feature maps with biases and activations.
Explore the cnn architecture, from convolution and pooling to dense layers, and learn how hierarchical feature maps, stride, and global pooling shape image processing in pytorch.
Compute the dimensionality of the initial feature vector into dense layers using convolution arithmetic with padding and strides, noting PyTorch uses explicit padding rather than same mode.
Learn to prepare convolutional neural network code by loading fashion amnesty and CFR 10 datasets, building and training the model, evaluating with accuracy and confusion matrices, and handling class encoding.
Explore a PyTorch cnn approach for fashion mnist in a Colab notebook, building convolutional and dense layers with activation and dropout, and evaluating train and test accuracy.
Explore CNN-based image classification on CIFAR-10 in Colab notebook, using color 32 by 32 images, data loaders, and functional forward pass; evaluate with accuracy, a confusion matrix, and misclassified samples.
apply on-the-fly data augmentation with torch vision transforms to improve model generalization, using randomized rotations, flips, and color changes within the training data loader.
Learn how batch normalization normalizes activations per batch by subtracting the batch mean and dividing by the batch standard deviation, then re-scaling with learned gamma and beta.
Learn how to forecast time series correctly, predicting multiple steps ahead using past values and a linear regression baseline, then extend to autoregressive approaches and iterative multi-step forecasts in PyTorch.
Explore autoregressive linear models for time series prediction by building a synthetic sine wave dataset with 10-step inputs and comparing incorrect and correct forecasting in PyTorch.
Demonstrates how a linear recurrence model (R2) can perfectly predict a sine wave using only two past values, without a bias, through autoregressive derivation with trig identities.
Explore recurrent neural networks and how they model sequences with a hidden state across time steps, using shared weights to process multi-dimensional time series and predict outputs.
Develop a simple PyTorch RNN for time-series forecasting, handling end-to-end steps from data loading to evaluation and prediction, including multi-layer RNNs, hidden state initialization, and shape management.
Learn how a recurrent neural network approaches time series prediction, compare with an auto regressive model, and analyze single-step and multi-step forecasts with noisy data.
Learn to track shapes in art using a PyTorch rnn, examining sequence length t, input dimensionality d, hidden units m, and outputs k through the forward pass.
Learn why vanishing gradients necessitated recurrent units like LSTM and GRU, and how update and reset gates preserve long-term memory through a convex combination.
Explore GRU and LSTM (pt 2) by detailing forget, input, and output gates, cell state dynamics, and how these gates enable long-term memory, with experiments showing LSTM often outperforms GRU.
Compare autoregressive linear models with neural networks on a non-linear time series, showing how a neural approach better captures changing frequency and supports one-step and multi-step forecasts.
Apply an rnn to image classification by treating images as a multi-dimensional time series, scanning rows top to bottom, with a final dense layer of 10 outputs and softmax activation.
Train a rnn for image classification on the M9 dataset using a prepared code lab notebook, loading 28 by 28 images, and achieve 99 percent accuracy after ten epochs.
Learn to predict stock returns with LSTMs using real Starbucks data, explore time-series windows and standardization, and critically assess multi-step forecasts and common pitfalls.
Develop an lstm-based stock predictor using open, high, low, close, and volume data, cast as a binary up or down classification with binary cross-entropy, exploring train/test splits and overfitting insights.
Explore alternative multi-step forecasts, compare one-step and iterative methods, and use baselines like the naive forecast and random walk to evaluate multi-output models forecasting twelve steps ahead.
This lecture explains why one-hot encoding is impractical for words and shows how embedding layers map word indices to dense vectors for sequence processing by recurrent neurons.
Build a PyTorch text model with an embedding layer mapping word indices to vectors, then process via the embedding, alice module, and final linear layer to yield K outputs.
Learn how to convert text to numbers for embedding layers by tokenization, word-to-index mapping, and padding strategies (pre or post) for fixed-length sequences.
Learn practical text preprocessing in PyTorch NLP by tokenizing, building word-to-index mappings with padding, converting documents to integer inputs, and coding from scratch to withstand library API changes.
Learn how to preprocess text for classification in torch text by converting documents into integer sequences, building vocab, and storing data in a CSB with input and label fields.
Learn text preprocessing in a notebook by building a CSV data frame, tokenizing with spaCy, forming a vocab, and applying padding for train and test data.
Explore text classification with LSTMs in a CoLab notebook, focusing on spam detection, tokenization, word to index mapping, padding, embedding, and training to achieve high accuracy.
This lecture explains how one-dimensional convolutional neural networks process text, using embeddings and global max pooling to extract features, followed by dense layers for binary classification.
Extend a trained NLP model to predict by preprocessing text, tokenizing, mapping to integers, and using the predict function, checking imbalanced classes with a confusion matrix and two prediction methods.
Learn to make predictions with a trained NLP model by tokenizing text, converting to a list of integers, creating a torch tensor, and predicting whether the input is spam.
Learn how deep learning builds recommender systems from user–item–rating triples with incomplete data, using embeddings to represent users and items, then a neural network for rating prediction, matrix factorization parallels.
Map users and movies to embeddings, combine them into a joint feature matrix, and train a two-input neural network for rating prediction using a data loader pipeline.
Build a deep learning recommender system using the movie lens dataset, with user and movie embeddings and a two-layer neural network. Prepare data, standardize ratings, and monitor RMSE via profiling.
Explore a modified recommender systems code in PyTorch, compare with TensorFlow, diagnose embedding-layer weight initialization, and implement a custom NumPy training loop for faster, improved mean squared error.
Use a trained recommender model to predict top unseen movies for a user. Prepare inputs as tensors, compute predictions, sort in descending order, and select the top 10 with scores.
Explore transfer learning with CNN architectures including veggie (VGG) variants, resonant networks with residual branches, Inception with parallel convolutions and multiple filter sizes, and mobile-friendly networks for lightweight devices.
Learn to manage large image datasets by loading data from disk with batch gradient descent, using TorchVision's image folder with train and validation class folders.
Explores two transfer learning approaches. One trains the full cnn with data augmentation inside the loop; the other pre compute feature vectors z and trains a logistic regression.
Practice transfer learning with data augmentation in PyTorch, using a pretrained torchvision model, freezing weights, and replacing the classifier with a new linear head to classify food vs non-food images.
Explore transfer learning without data augmentation using a prepared notebook, precomputing features, and training a fast logistic regression classifier with about 200x speedup and comparable accuracy.
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.
Welcome to PyTorch: Deep Learning and Artificial Intelligence!
Although Google's Deep Learning library Tensorflow has gained massive popularity over the past few years, PyTorch has been the library of choice for professionals and researchers around the globe for deep learning and artificial intelligence.
Is it possible that Tensorflow is popular only because Google is popular and used effective marketing?
Why did Tensorflow change so significantly between version 1 and version 2? Was there something deeply flawed with it, and are there still potential problems?
It is less well-known that PyTorch is backed by another Internet giant, Facebook (specifically, the Facebook AI Research Lab - FAIR). So if you want a popular deep learning library backed by billion dollar companies and lots of community support, you can't go wrong with PyTorch. And maybe it's a bonus that the library won't completely ruin all your old code when it advances to the next version. ;)
On the flip side, it is very well-known that all the top AI shops (ex. OpenAI, Apple, and JPMorgan Chase) use PyTorch. OpenAI just recently switched to PyTorch in 2020, a strong sign that PyTorch is picking up steam.
If you are a professional, you will quickly recognize that building and testing new ideas is extremely easy with PyTorch, while it can be pretty hard in other libraries that try to do everything for you. Oh, and it's faster.
Deep Learning has been responsible for some amazing achievements recently, such as:
Generating beautiful, photo-realistic images of people and things that never existed (GANs)
Beating world champions in the strategy game Go, and complex video games like CS:GO and Dota 2 (Deep Reinforcement Learning)
Self-driving cars (Computer Vision)
Speech recognition (e.g. Siri) and machine translation (Natural Language Processing)
Even creating videos of people doing and saying things they never did (DeepFakes - a potentially nefarious application of deep learning)
This course is for beginner-level students all the way up to expert-level students. How can this be?
If you've just taken my free Numpy prerequisite, then you know everything you need to jump right in. We will start with some very basic machine learning models and advance to state of the art concepts.
Along the way, you will learn about all of the major deep learning architectures, such as Deep Neural Networks, Convolutional Neural Networks (image processing), and Recurrent Neural Networks (sequence data).
Current projects include:
Natural Language Processing (NLP)
Recommender Systems
Transfer Learning for Computer Vision
Generative Adversarial Networks (GANs)
Deep Reinforcement Learning Stock Trading Bot
Even if you've taken all of my previous courses already, you will still learn about how to convert your previous code so that it uses PyTorch, and there are all-new and never-before-seen projects in this course such as time series forecasting and how to do stock predictions.
This course is designed for students who want to learn fast, but there are also "in-depth" sections in case you want to dig a little deeper into the theory (like what is a loss function, and what are the different types of gradient descent approaches).
I'm taking the approach that even if you are not 100% comfortable with the mathematical concepts, you can still do this! In this course, we focus more on the PyTorch library, rather than deriving any mathematical equations. I have tons of courses for that already, so there is no need to repeat that here.
Instructor's Note: This course focuses on breadth rather than depth, with less theory in favor of building more cool stuff. If you are looking for a more theory-dense course, this is not it. Generally, for each of these topics (recommender systems, natural language processing, reinforcement learning, computer vision, GANs, etc.) I already have courses singularly focused on those topics.
Thanks for reading, and I’ll see you in class!
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)
UNIQUE FEATURES
Every line of code explained in detail - email me any time if you disagree
No wasted time "typing" on the keyboard like other courses - let's be honest, nobody can really write code worth learning about in just 20 minutes from scratch
Not afraid of university-level math - get important details about algorithms that other courses leave out