# ModuleStudy-CIFAR10 **Repository Path**: maotao_break/module-study-cifar10 ## Basic Information - **Project Name**: ModuleStudy-CIFAR10 - **Description**: 基于LeNet、AlexNet和MobileNet 架构训练CIFAR-10数据集 - **Primary Language**: Python - **License**: MPL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-09 - **Last Updated**: 2025-05-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 基于LeNet、AlexNet和MobileNet 架构训练CIFAR-10数据集 * [基于LeNet、AlexNet和MobileNet 架构训练CIFAR-10数据集](#基于lenetalexnet和mobilenet-架构训练cifar-10数据集) * [训练集](#训练集) * [训练](#训练) * [结果](#结果) * [模型 weights/](#模型-weights) * [曲线 training_plots/](#曲线-training_plots) * [应用](#应用) ## 训练集 1. 下载 [https://www.cs.toronto.edu/~kriz/cifar.html](https://www.cs.toronto.edu/~kriz/cifar.html) 2. 解压并放入目录内:cifar-10-batches-py/ ## 训练 1. 选择模型:在 trainer.py 内的 main 中 ```python if __name__ == '__main__': # 示例:训练MobileNet、LeNet for model in [MobileNet, LeNet]: trained_model = train_model(model(), epochs=20) torch.save(trained_model.state_dict(), f"weights/cifar10_{model.__name__}.pth") ``` 2. 运行[trainer.py](trainer.py) ## 结果 ### 模型 weights/ * cifar10_AlexNet.pth * cifar10_LeNet.pth * cifar10_MobileNetCIFAR.pth ### 曲线 training_plots/ ![](doc/AlexNet_training_curves.png) ![](doc/MobileNetCIFAR_training_curves.png) ![](doc/LeNet_training_curves.png) ## 应用 运行[test.py](test/test.py)