Skip to content

Commit 424851b

Browse files
leonyangdevclaude
andcommitted
feat: 初始化手写数字识别项目
包含两层神经网络的完整实现(纯 numpy): - 核心模块:dataset / model / optimizer / trainer - 14章深度学习入门小册子(book/) - VitePress 网站配置(支持 GitHub Pages & Vercel 部署) - GitHub Actions 自动部署工作流 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 parents  commit 424851b

33 files changed

Lines changed: 8591 additions & 0 deletions

.github/workflows/deploy-book.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy Book to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'book/**'
8+
- '.github/workflows/deploy-book.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
name: Build VitePress
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '20'
34+
cache: 'npm'
35+
cache-dependency-path: book/package.json
36+
37+
- name: Install dependencies
38+
working-directory: book
39+
run: npm install
40+
41+
- name: Build VitePress
42+
working-directory: book
43+
env:
44+
# 仓库名改成你在 GitHub 上起的名字,例如 digit-recognizer
45+
VITEPRESS_BASE: /digit-recognizer/
46+
run: npm run build
47+
48+
- name: Upload Pages artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: book/.vitepress/dist
52+
53+
deploy:
54+
name: Deploy to GitHub Pages
55+
needs: build
56+
runs-on: ubuntu-latest
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*.egg-info/
5+
.venv/
6+
venv/
7+
dist/
8+
build/
9+
10+
# 数据文件(太大,不入库)
11+
data/
12+
outputs/
13+
14+
# Jupyter
15+
.ipynb_checkpoints/
16+
17+
# macOS
18+
.DS_Store
19+
20+
# VitePress 构建产物
21+
book/node_modules/
22+
book/.vitepress/cache/
23+
book/.vitepress/dist/

0 commit comments

Comments
 (0)