Deep Learning Fundamentals

- Deep Learning Fundamentals
- Unit 1Intro to ML and DL
- Unit 2Using Tensors w/ PyTorch
- Unit 3Model Training in PyTorch
- Unit 3.1Using Logistic Regression for Classification
- Unit 3.2The Logistic Regression Computation Graph
- Unit 3.3Model Training with Stochastic Gradient Descent
- Unit 3.4Automatic Differentiation in PyTorch
- Unit 3.5The PyTorch API
- Unit 3.6Training a Logistic Regression Model in PyTorch
- Unit 3.7 Feature Normalization
- Unit 3 ExercisesUnit 3 Exercies

- Unit 4Training Multilayer Neural Networks Overview
- Unit 4.1Logistic Regression for Multiple Classes
- Unit 4.2Multilayer Neural Networks
- Unit 4.3Training a Multilayer Neural Network in PyTorch
- Unit 4.4Defining Efficient Data Loaders
- Unit 4.5Multilayer Neural Networks for Regression
- Unit 4.6Speeding Up Model Training Using GPUs
- Unit 4 ExercisesUnit 4 Exercises

- Unit 5Organizing Your Code with Lightning
- Unit 5.1 Organizing Your Code with Lightning
- Unit 5.2Training a Multilayer Perceptron using the Lightning Trainer
- Unit 5.3Computing Metrics Efficiently with TorchMetrics
- Unit 5.4Making Code Reproducible
- Unit 5.5Organizing Your Data Loaders with Data Modules
- Unit 5.6The Benefits of Logging Your Model Training
- Unit 5.7Evaluating and Using Models on New Data
- Unit 5.8Add Functionality with Callbacks
- Unit 5 ExercisesUnit 5 Exercises

#### Unit 6 Coming Soon

# Logistic Regression for Multiple Classes (Part 1-5)

#### Slides

**What we covered in this video lecture**

In this video, we extended the binary logistic regression model to a multinomial logistic regression model that works with an arbitrary number of classes. In machine learning and deep learning contexts, this multinomial logistic regression model is commonly called *softmax regression*.

We saw that only minimal code changes required when we turn a logistic regression model into a softmax regression model. We replaced the logistic sigmoid function with a softmax activation function, and we replaced the binary cross-entropy loss by the categorical cross-entropy loss.

**Additional resources if you want to learn more**

It can sometimes be tricky to remember the correct inputs for the different cross-entropy loss functions in PyTorch, so I created a small cheat sheet here.

**Log in or create a free Lightning.ai account to access:**

- Quizzes
- Completion badges
- Progress tracking
- Additional downloadable content
- Additional AI education resources
- Notifications when new units are released
- Free cloud computing credits