# Pytorch_Cifar10_Classification **Repository Path**: delingwei/Pytorch_Cifar10_Classification ## Basic Information - **Project Name**: Pytorch_Cifar10_Classification - **Description**: 进行基于pytorch的cifar10数据集图像分类demo - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 2 - **Created**: 2022-03-31 - **Last Updated**: 2025-05-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CIFAR-10 image classification 此项目为基于resnet101的cifar10数据集图像分类demo ## 1、数据集CIFAR-10 该数据集共有10类,每类6000张图片,共60000张图片,图片大小为32*32。其中有50000张用于训练,构成了5个训练批,每一批10000张图;另外10000张用于测试,单独构成一批。测试批的数据里,取自10类中的每一类,每一类随机取1000张。 ![cifar10.png](./asset/cifar10.png) ## 2、项目文件目录 cifar10_classification ├── asset │ └── cifar10.png ├── data │ ├── cifar-10-batches-py │ └── cifar-10-python.tar.gz ├── model.py ├── net_test.py ├── plot_img.py ├── README.md ├── requirements.txt ├── train.log ├── train.py ├── venv │ ├── Include │ ├── Lib │ ├── pyvenv.cfg │ └── Scripts └── weights ​ └── cifar10_net.pth ## 3、模型训练 主要训练参数如下: --epochs #设置模型训练总epoch数 --bs #设置模型训练 batchsize ```python 示例训练命令: python model_train.py --epochs=10 --bs=4 ``` 训练生成模型权重在 ./weights 目录下 ## 4、模型测试 提供不同需求的测试功能: ```python 执行脚本 python model_test.py 不同测试接口模块说明如下: single_test() #进行随机batch图像的测试 full_test() #进行全部测试集的分类准确度测试 test_eachclass_acc() #进行每一类分类准确度测试 ```