Save this video free

Lecture 7d

Prof. Schniter · 57:45 · Watch on YouTube

Part of The Ohio State University ECE 5307. See all 35 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

The lecture derives mini-batch backpropagation for a neural network, then converts scalar gradient equations into vectorized matrix operations that GPUs can execute efficiently. It also walks through a PyTorch training workflow using tensors, DataLoader, a sigmoid network, binary cross-entropy, and AdamW, and interprets a 2,000-epoch run that reaches about 90% training accuracy despite the network's nonconvex loss.

Key takeaways

Chapters

0:00 From Mini-Batch Backpropagation to Vectorized Equations
4:35 Representing Samples and Biases as Matrices
13:24 Matrix Backpropagation, Hadamard Products, and GPU Computation
22:00 Distributed Training and How Mini-Batches Are Shuffled
23:37 Binary Cross-Entropy and Softmax Gradient Choices
26:13 Why PyTorch Replaced the Lecture's TensorFlow Workflow
32:42 PyTorch Tensors, Dataset, and DataLoader Setup
37:54 Defining the Sigmoid Network, AdamW, and Loss
44:52 Training Loop: Forward Pass, Gradients, and Parameter Updates
48:42 Classification Accuracy and PyTorch no_grad Evaluation
56:13 Training Results, Nonconvexity, and Extracting Model Outputs

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:01 All right, welcome back everyone. Um so we were talking about how we adjust the network parameters in our neural net. So we have the weights and biases for the hidden layer, the weights and biases for the output layer. And we said we're going to um define a loss J, which depends on usually the negative log likelihood. And then we said um we're going to use gradient descent, but we're going to use a version of gradient descent called mini-batch stochastic gradient descent that only uses a few training samples at a time when computing uh the gradient in the gradient descent algorithm.

0:48 And this is because if you really did pure gradient descent and you use it all the training samples, it would take too long. And it wouldn't be worthwhile because the gradient doesn't point you actually in the direction you want to go. And so there's really no point in computing that gradient perfectly. So this is how we're doing it. This is the overall algorithm. And what we were talking about last time was how exactly do we compute the gradient of this term here? And that is um what we call the uh forward or the forward pass and the backward pass. So we start by um

1:34 writing a graph that shows how the different variables depend on each other, called the computational graph. And we're focusing just on a single iteration of stochastic gradient descent. So at the start of this iteration, we have the previous values of our parameters. And we have our training data in that mini-batch. And then what we do is we do a forward pass where we start on the left and move our way right and we use um you know, whatever ingredients it takes to compute the intermediate variables

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Prof. Schniter.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.