文章大纲
在本文中,您将学习如何使用小批量梯度下降训练PyTorch Logistic回归模型
Logistic Regression With Mini-Batch Gradient Descent
Objective
- Represent your data as a Dataset object
- Create a Logistic Regression Model using PyTorch
- Set a Criterion to calculate Loss
- Create a Data Loader and set the Batch Size
- Create an Optimizer to update Model Parameters and set Learning Rate
- Train a Model
Table of Contents
In this article, you will learn how to train a PyTorch Logistic Regression model using Mini-Batch Gradient Descent.
- Load Data
- Create the Model and Total Loss Function (Cost)
- Setting the Batch Size using a Data Loader
- Setting the Learning Rate
- Trai