https://github.com/stillmisty/cifar-10
仅使用Numpy对CIFAR-10训练CNN
https://github.com/stillmisty/cifar-10
Last synced: about 2 months ago
JSON representation
仅使用Numpy对CIFAR-10训练CNN
- Host: GitHub
- URL: https://github.com/stillmisty/cifar-10
- Owner: StillMisty
- License: apache-2.0
- Created: 2024-12-11T11:02:21.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T11:12:31.000Z (5 months ago)
- Last Synced: 2025-02-05T12:16:45.728Z (4 months ago)
- Language: Python
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CUFAR-10数据集训练
## 环境管理
本项目使用UV进行环境管理,具体使用方法如下:
```shell
# 安装UV(Windows环境)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"# 同步环境
uv sync
```## 训练代码
train_simple_convent.py是一个简单的卷积神经网络训练代码
train_self_deep_convent.py是一个更深的卷积神经网络训练代码,具体结构如下:
- 3个卷积层,每层后接ReLU激活和池化层
- 2个全连接层,中间有ReLU激活
- 使用Softmax进行最终分类
- 权重使用He初始化方法
- Z-score标准化train_self_deep_convent_L2.py相对于train_self_deep_convent.py使用了L2正则化,以及添加了Dropout层
训练过程中会自动检测数据集是否存在,如果不存在会自动下载,耐心等待即可
## 训练结果
所有最终的模型文件存储在result文件夹下