# Cifar_first-try **Repository Path**: zhang-chuanrui/cifar_first-try ## Basic Information - **Project Name**: Cifar_first-try - **Description**: 使用VGG16与Resnet34对Cifar10数据集进行分类。 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 0 - **Created**: 2021-07-20 - **Last Updated**: 2025-11-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: PyTorch ## README # Cifar_first-try #### 介绍 使用VGG与Resnet对Cifar10数据集进行分类。 #### 安装教程 ##### 安装要求 - Linux - python3 - NVIDIA GPU + CUDA CuDNN ##### 安装步骤 1. 下载本项目 ``` git clone https://gitee.com/zhang-chuanrui/cifar_first-try.git ``` 2. 安装环境 选择一:anaconda新建环境 ``` conda create -n pytorch python=3.6.2 激活环境 conda activate pytorch conda下载依赖项 conda install --yes --file requirements.txt ``` 选择二:直接安装依赖项目 ``` pip3 install -r requirement.txt ``` #### 运行说明 ##### 准备数据集 1. 下载数据集 ``` http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz ``` 2. 将数据集移动到默认路径```data\cifar\``` 如需修改路径,可以修改arg中的```--data_folder```一项定位到自己的路径 3. 解压文件夹```tar -zxvf cifar-10-python.tar.gz``` ##### 准备训练 本项目支持单卡与多卡训练,单卡训练运行命令如下: ``` python main.py --method=VGG16 ``` 其余参数均为默认,可在```options\base_options.py```中查看 多卡训练命令如下: ``` python main.py --method=VGG16 --multiprocessing-distributed ``` 可使用本机多卡多进程训练 本项目模型使用```--method```参数选择,支持```'VGG13''VGG16''VGG19''Resnet34''Resnet50'``` 其中resnet按照原文中的实验,准备了ABC三种维度变化方法,可以使用```--resnet-opt```参数选择,运行结果与原文一致