Pruning basics and actual combat (2): L1 and L2 regularization and BatchNormalization explanation

1. CIFAR10 dataset

CIFAR10 is one of the first data sets for introductory deep learning. It is mainly used in image classification tasks. The data set has a total of 10个categories.
insert image description here

  • Number of pictures:6w 张
  • Image width and height:32x32
  • Image category: 10
  • Trainset: 5w sheets, 5 training blocks
  • Testset: 1w sheets, 1 test block

Pytorch integrates APIs of many common data sets. These data sets can be downloaded through pytorch and made into DataSet and Dataloader required by the model for model training.

1.1 Dataset preparation

Make Dataloader: utils.pythe code implementation is as follows:

import torchvision.datasets as datasets
import torchvision.transforms as transforms

Guess you like

Origin blog.csdn.net/weixin_38346042/article/details/132393099