
Explore PyTorch from basics to advanced projects, with theory, hands-on practice, quizzes, and activities; build tensors, auto gradient, neural networks, and CNNs for MRI brain tumor classification.
Zia, lead instructor at AI Sciences, introduces the beginner-friendly PyTorch power course and highlights AI Sciences' mission to help beginners start careers in data science and artificial intelligence.
Discover how PyTorch provides abstraction and ease of use, reducing code from thousands to dozens. Leverage pre-built components, efficiency, cross-platform compatibility, and a vast community for reusable models and updates.
Learn to pick an IDE for PyTorch, explore Google Colab's free GPU, and install PyTorch locally by selecting your system and running the install command.
Learn the basics of tensors, compare them to lists and arrays, perform mathematical operations, explore auto gradient for differentiation, and harness GPU acceleration for tensor computations.
Compare how lists, arrays, and PyTorch tensors differ in type, dimensionality, and memory layout, and discover how tensors enable fast GPU and TPU acceleration with autograd.
Explore basic arithmetic on tensors with PyTorch, performing addition, subtraction, multiplication, division, remainder, and exponent operations, including in-place and longhand shorthand operations.
Explore tensor creation, data types, and random value generation in PyTorch, including zeros, ones, rand, and randint. Learn reshape vs. view and how memory contiguity affects reshaping.
Discover how autograd in PyTorch automatically computes gradients during backpropagation, using scalar loss and chain rule to update weights in neural networks.
Construct x and w, compute y = (x * w).sum(), and run y.backward() to obtain the gradient of w; observe that w.grad appears only after backward.
Learn to manage gradients in PyTorch, detaching gradients and using no_grad contexts to switch from training to forward inference, including requires_grad and detach.
discover how to run pytorch tensors on GPUs or tpus in google colab by selecting a device, moving tensors to cuda when available, and comparing cpu versus gpu performance.
Build a deep neural network in PyTorch from tensor basics using a dummy data set, then replace Python code with PyTorch components—loss, optimizers, activations, loaders, transforms—ending with iris data set.
Build a basic neural network in PyTorch from a toy data set, converting NumPy data to tensors, enabling autograd, and training with three inputs and two outputs: apples and oranges.
Define a simple linear regression model in PyTorch using features like temperature, rain, and humidity with weights and bias, and train with mean squared error loss via backpropagation.
Analyze how loss functions, optimizers, and activation functions drive backpropagation in neural networks using PyTorch, compare mean squared error, mean absolute error, and cross-entropy, and leverage built-in functions for training.
Explore activation functions and build a simple neural network with one hidden layer in PyTorch, using ReLU, leaky ReLU, sigmoid, and tanh for deep learning.
The lecture explains optimizers as managers of forward and backward propagation, updating weights and biases to minimize loss, with learning rate strategies and examples like Adam.
learn to create a tensor data set and a data loader, configure batch size and shuffle, and implement stochastic gradient descent alongside Adam in PyTorch.
Build a deep neural network in PyTorch with the iris dataset, two hidden layers, four features, three classes, an 80/20 train/test split, and training with loss, activation, and optimizer.
Convert the iris target to numeric via one-hot encoding, split data into train and test sets, build a PyTorch DNN, train with SGD and cross-entropy loss, and analyze predictions.
Learn to convert model predictions into class labels using argmax, map indices to setosa, versicolor, and virginica, and compare predictions with targets via a pandas dataframe.
Record losses and epochs during training, then plot the loss curve with matplotlib, labeling axes and displaying the graph after training a neural network on iris data set.
Explore how a normal neural network differs from a convolutional neural network and learn to implement convolutional and pooling layers with tensors in PyTorch for image based data.
Explore how convolutional and pooling layers reduce high-dimensional image features while preserving edges, making CNNs excel at image tasks and the brain tumor detection project.
Discover how CNNs use a kernel (filter) to convolve image arrays via dot products, slide the window, and understand output size and pooling ideas with padding considerations.
Explore 2d convolution with numpy by applying a kernel to an input image via dot-product to produce an output, with padding and stride, illustrated by animations.
Implement a PyTorch 2d convolution to replace numpy-based code, loading and converting an image to a grayscale tensor, then applying a 3 by 3 kernel with specified stride and padding.
Explore pooling in CNNs, focusing on max pooling and its relation to average pooling, with a 2×2 window selecting maximum values. Derive the pooling output size formula alongside convolution concepts.
Explore max pooling with a 2x2 kernel using numpy and PyTorch, calculating output dimensions, extracting patches, and comparing max and average pooling for feature sharpening and dimensionality reduction.
Learn to implement max pooling in PyTorch for CNNs using a 2x2 kernel and stride 2, transforming convolution outputs into pooled images and preparing for a medical image classification project.
Import the brain tumor MRI dataset and train a four-block cnn with leaky relu, cross-entropy, and adam on Google Colab to classify tumors vs healthy using a train-test split.
Load a brain tumor data set into Google Colab by mounting Google Drive, unzipping, and organizing images into train and validation folders with an 80/20 split, using the split-folders library.
Create a torchvision transform pipeline to resize images to 128 by 128, apply random flips, and rotation of 30 degrees, convert to tensor, then normalize by RGB mean and std.
Explore visualizing and preparing image data for neural networks, including tensor formats, batch loading with data loaders, and preparing 64-image batches of 128x128 RGB images for CNN training and validation.
Explore a convolutional neural network with four convolution layers, four pooling layers, and two fully connected layers, and implement forward propagation in the cnn architecture.
Build a four-layer convolutional network with max-pool and leaky relu activations, flatten to 2048 inputs, and connect to two fully connected layers for brain tumor and healthy.
Learn to implement a cnn training loop with cross-entropy loss, the Adam optimizer, a learning rate scheduler on plateau, and validation accuracy tracking across ten epochs.
Explore the final phase of a CNN project, training over ten epochs to 96% accuracy, and visualize training versus validation loss for future predictions.
Learn how to load and visualize an image, apply PyTorch transformations, add a batch dimension, run a forward pass through the model, and interpret the predicted label for image classification.
Welcome to "Deep Learning with PyTorch"! This course is designed to take you from the basics of tensors to building complex neural networks, culminating in mastering convolutional neural networks (CNNs) for advanced image recognition tasks. Whether you're a beginner or an experienced developer, this course offers a comprehensive learning experience.
You'll learn the theory behind neural networks, gain practical coding experience, and test your knowledge with quizzes and activities. Our final project will challenge you to build a CNN for detecting brain tumors from MRI images, preparing you for real-world applications.
Enroll now to start your journey in deep learning and PyTorch, and unlock the potential of AI to transform industries and drive innovation.
Course Modules
Introduction
Intro to Instructor: Meet your instructor and understand their background and expertise in deep learning and PyTorch.
Intro to Course: Get an overview of the course structure, including the flow of theory, practice, quizzes, and activities. Understand the course content, which covers basics of tensors, neural networks with tensors, and CNNs with PyTorch.
Why Use a Framework: Learn about the advantages of using frameworks like PyTorch, including autograd and GPU acceleration.
Installations: Step-by-step guidance on setting up your development environment, including IDE and Google Colab, to ensure you are ready to code along.
Intro to Tensors
List vs Array vs Tensor: Understand the differences between lists, arrays, and tensors, and why tensors are crucial for deep learning.
Tensor Operations: Learn various operations that can be performed on tensors, from basic manipulations to complex transformations.
Math Operations on Tensors: Dive into mathematical operations on tensors, which form the backbone of neural network computations.
Autograd: Explore automatic differentiation with autograd, a core feature in PyTorch that simplifies gradient calculations.
Check GPU of Notebook: Ensure your setup is optimized for performance by checking GPU availability in your development environment.
Neural Networks with Tensors
Basic Neural Networks: Build your first neural network using PyTorch and understand its components.
Loss Functions: Learn about different loss functions and their importance in training neural networks.
Optimizers: Explore various optimization algorithms that help improve your neural network's performance.
Activation Functions: Understand the role of activation functions in introducing non-linearity to neural networks.
Data Loader: Master the DataLoader class in PyTorch for efficient data handling and batching.
Transforms: Learn how to preprocess and augment data using transforms.
Deep Neural Networks (DNN): Scale your knowledge to build deeper and more complex neural networks.
CNN with PyTorch
Convolution: Understand the concept of convolution and how it applies to image recognition tasks.
Pooling: Learn about pooling layers and their role in reducing spatial dimensions.
Building a CNN: Step-by-step guide to constructing a convolutional neural network in PyTorch.
Final Project: Brain Tumor Detection from MRI Images: Apply everything you've learned to build a CNN that detects brain tumors from MRI images. This hands-on project will not only solidify your understanding but also give you a portfolio-worthy piece to showcase your skills.
Who Should Enroll
This course is ideal for:
Beginners who want to enter the field of deep learning and artificial intelligence.
Software developers and data scientists looking to expand their skillset with PyTorch.
Machine learning enthusiasts eager to build and deploy neural network models.
Anyone interested in applying deep learning to real-world problems and projects.
Prerequisites
Basic understanding of Python programming.
Familiarity with fundamental concepts of machine learning is a plus but not mandatory.
What You'll Gain
A solid understanding of tensors and their operations in PyTorch.
The ability to build and train basic to complex neural networks.
Knowledge of different loss functions, optimizers, and activation functions.
Expertise in using DataLoader and transforms for data handling.
Practical experience in constructing convolutional neural networks.
A completed project on brain tumor detection from MRI images, showcasing your skills in deep learning and PyTorch.
Unlock the power of deep learning with PyTorch and take a significant step towards becoming an AI expert. Enroll now and transform your career!