Skip to content

Commit 1f18f7a

Browse files
authored
Merge pull request #506 from microsoft/update-translations
🌐 Update translations via Co-op Translator
2 parents 61d10ed + c4c08ba commit 1f18f7a

File tree

165 files changed

+150944
-279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+150944
-279
lines changed

translations/hk/README.md

Lines changed: 89 additions & 78 deletions
Large diffs are not rendered by default.

translations/hk/lessons/2-Symbolic/Animals.ipynb

Lines changed: 478 additions & 0 deletions
Large diffs are not rendered by default.

translations/hk/lessons/2-Symbolic/FamilyOntology.ipynb

Lines changed: 595 additions & 0 deletions
Large diffs are not rendered by default.

translations/hk/lessons/2-Symbolic/MSConceptGraph.ipynb

Lines changed: 548 additions & 0 deletions
Large diffs are not rendered by default.

translations/hk/lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb

Lines changed: 1092 additions & 0 deletions
Large diffs are not rendered by default.

translations/hk/lessons/3-NeuralNetworks/03-Perceptron/lab/PerceptronMultiClass.ipynb

Lines changed: 277 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
<!--
22
CO_OP_TRANSLATOR_METADATA:
33
{
4-
"original_hash": "7336583e4630220c835335da640016db",
5-
"translation_date": "2025-08-24T22:10:58+00:00",
4+
"original_hash": "ba5d1eb353d20d3e7181066b3c424b99",
5+
"translation_date": "2025-08-31T09:20:54+00:00",
66
"source_file": "lessons/3-NeuralNetworks/03-Perceptron/lab/README.md",
77
"language_code": "hk"
88
}
99
-->
1010
# 使用感知器進行多類別分類
1111

12-
來自 [AI for Beginners Curriculum](https://github.com/microsoft/ai-for-beginners) 的實驗作業
12+
來自 [AI for Beginners Curriculum](https://github.com/microsoft/ai-for-beginners) 的實驗課題
1313

1414
## 任務
1515

16-
使用我們在本課中為 MNIST 手寫數字進行二元分類所開發的程式碼,創建一個多類別分類器,能夠識別任何數字。計算訓練集和測試集的分類準確率,並輸出混淆矩陣。
16+
利用我們在本課中為 MNIST 手寫數字進行二元分類所開發的程式碼,創建一個多類別分類器,能夠識別任意數字。計算訓練集和測試集的分類準確率,並輸出混淆矩陣。
1717

1818
## 提示
1919

20-
1. 對於每個數字,創建一個二元分類器的數據集,將其設為「該數字 vs. 其他所有數字」
21-
1. 訓練 10 個不同的感知器進行二元分類(每個數字一個感知器)
22-
1. 定義一個函數來分類輸入的數字
20+
1. 對於每個數字,創建一個二元分類的數據集,將「該數字」與「所有其他數字」進行分類。
21+
1. 訓練 10 個不同的感知器進行二元分類(每個數字對應一個感知器)。
22+
1. 定義一個函數來分類輸入的數字
2323

24-
> **提示**如果我們將所有 10 個感知器的權重組合成一個矩陣,我們應該能夠通過一次矩陣乘法將所有 10 個感知器應用到輸入數字上。最有可能的數字可以通過對輸出應用 `argmax` 操作來找到。
24+
> **提示**: 如果我們將所有 10 個感知器的權重組合成一個矩陣,我們應該能夠通過一次矩陣乘法將所有 10 個感知器應用到輸入數字上。最可能的數字可以通過對輸出應用 `argmax` 操作來找到。
2525
2626
## 起始筆記本
2727

28-
通過打開 [PerceptronMultiClass.ipynb](../../../../../../lessons/3-NeuralNetworks/03-Perceptron/lab/PerceptronMultiClass.ipynb) 開始實驗。
28+
通過打開 [PerceptronMultiClass.ipynb](PerceptronMultiClass.ipynb) 開始實驗課題。
29+
30+
---
2931

3032
**免責聲明**
31-
本文件已使用人工智能翻譯服務 [Co-op Translator](https://github.com/Azure/co-op-translator) 進行翻譯。我們致力於提供準確的翻譯,但請注意,自動翻譯可能包含錯誤或不準確之處。應以原文文件作為權威來源。對於關鍵資訊,建議尋求專業人工翻譯。我們對因使用此翻譯而引起的任何誤解或誤釋不承擔責任
33+
本文件已使用人工智能翻譯服務 [Co-op Translator](https://github.com/Azure/co-op-translator) 進行翻譯。儘管我們致力於提供準確的翻譯,但請注意,自動翻譯可能包含錯誤或不準確之處。原始文件的母語版本應被視為權威來源。對於重要信息,建議使用專業人工翻譯。我們對因使用此翻譯而引起的任何誤解或錯誤解釋概不負責

translations/hk/lessons/3-NeuralNetworks/04-OwnFramework/OwnFramework.ipynb

Lines changed: 1335 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# 使用我們自己的框架進行 MNIST 數字分類\n",
8+
"\n",
9+
"來自 [AI 初學者課程](https://github.com/microsoft/ai-for-beginners) 的實驗作業。\n",
10+
"\n",
11+
"### 讀取數據集\n",
12+
"\n",
13+
"此程式碼會從網絡上的存儲庫下載數據集。你也可以手動從 AI 課程存儲庫的 `/data` 目錄中複製數據集。\n"
14+
]
15+
},
16+
{
17+
"cell_type": "code",
18+
"execution_count": 4,
19+
"metadata": {
20+
"tags": []
21+
},
22+
"outputs": [
23+
{
24+
"name": "stderr",
25+
"output_type": "stream",
26+
"text": [
27+
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
28+
" Dload Upload Total Spent Left Speed\n",
29+
"\n",
30+
" 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\n",
31+
"100 9.9M 100 9.9M 0 0 9.9M 0 0:00:01 --:--:-- 0:00:01 15.8M\n"
32+
]
33+
}
34+
],
35+
"source": [
36+
"!rm *.pkl\n",
37+
"!wget https://raw.githubusercontent.com/microsoft/AI-For-Beginners/main/data/mnist.pkl.gz\n",
38+
"!gzip -d mnist.pkl.gz"
39+
]
40+
},
41+
{
42+
"cell_type": "code",
43+
"execution_count": 3,
44+
"metadata": {},
45+
"outputs": [],
46+
"source": [
47+
"import pickle\n",
48+
"with open('mnist.pkl','rb') as f:\n",
49+
" MNIST = pickle.load(f)"
50+
]
51+
},
52+
{
53+
"cell_type": "code",
54+
"execution_count": 4,
55+
"metadata": {},
56+
"outputs": [],
57+
"source": [
58+
"labels = MNIST['Train']['Labels']\n",
59+
"data = MNIST['Train']['Features']"
60+
]
61+
},
62+
{
63+
"cell_type": "markdown",
64+
"metadata": {},
65+
"source": [
66+
"讓我們看看我們擁有的數據形狀:\n"
67+
]
68+
},
69+
{
70+
"cell_type": "code",
71+
"execution_count": 5,
72+
"metadata": {},
73+
"outputs": [
74+
{
75+
"data": {
76+
"text/plain": [
77+
"(42000, 784)"
78+
]
79+
},
80+
"execution_count": 5,
81+
"metadata": {},
82+
"output_type": "execute_result"
83+
}
84+
],
85+
"source": [
86+
"data.shape"
87+
]
88+
},
89+
{
90+
"cell_type": "markdown",
91+
"metadata": {},
92+
"source": [
93+
"### 分割數據\n",
94+
"\n",
95+
"我們將使用 Scikit Learn 將數據分為訓練集和測試集:\n"
96+
]
97+
},
98+
{
99+
"cell_type": "code",
100+
"execution_count": 6,
101+
"metadata": {},
102+
"outputs": [
103+
{
104+
"name": "stdout",
105+
"output_type": "stream",
106+
"text": [
107+
"Train samples: 33600, test samples: 8400\n"
108+
]
109+
}
110+
],
111+
"source": [
112+
"from sklearn.model_selection import train_test_split\n",
113+
"\n",
114+
"features_train, features_test, labels_train, labels_test = train_test_split(data,labels,test_size=0.2)\n",
115+
"\n",
116+
"print(f\"Train samples: {len(features_train)}, test samples: {len(features_test)}\")"
117+
]
118+
},
119+
{
120+
"cell_type": "markdown",
121+
"metadata": {},
122+
"source": [
123+
"### 指示\n",
124+
"\n",
125+
"1. 從課堂中取得框架代碼,並將其貼到此筆記本中,或(更好)貼到一個獨立的 Python 模組中\n",
126+
"1. 定義並訓練單層感知器,觀察訓練和驗證的準確率在訓練過程中的變化\n",
127+
"1. 嘗試理解是否出現過度擬合,並調整層的參數以改善準確率\n",
128+
"1. 重複上述步驟,訓練兩層和三層感知器。嘗試在層之間使用不同的激活函數進行實驗\n",
129+
"1. 嘗試回答以下問題:\n",
130+
" - 層間的激活函數是否影響網絡性能?\n",
131+
" - 這個任務是否需要兩層或三層的網絡?\n",
132+
" - 在訓練網絡時是否遇到任何問題?尤其是當層數增加時。\n",
133+
" - 網絡的權重在訓練過程中如何變化?你可以繪製權重的最大絕對值與訓練輪次的關係圖來理解這種關係。\n"
134+
]
135+
},
136+
{
137+
"cell_type": "code",
138+
"execution_count": null,
139+
"metadata": {},
140+
"outputs": [],
141+
"source": []
142+
},
143+
{
144+
"cell_type": "markdown",
145+
"metadata": {},
146+
"source": [
147+
"\n---\n\n**免責聲明**: \n本文件已使用人工智能翻譯服務 [Co-op Translator](https://github.com/Azure/co-op-translator) 進行翻譯。我們致力於提供準確的翻譯,但請注意,自動翻譯可能包含錯誤或不準確之處。應以原文文件作為權威來源。如涉及關鍵資訊,建議尋求專業人工翻譯。我們對因使用此翻譯而引起的任何誤解或誤釋概不負責。\n"
148+
]
149+
}
150+
],
151+
"metadata": {
152+
"kernelspec": {
153+
"display_name": "Python 3.7.4 64-bit (conda)",
154+
"metadata": {
155+
"interpreter": {
156+
"hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5"
157+
}
158+
},
159+
"name": "python3"
160+
},
161+
"language_info": {
162+
"codemirror_mode": {
163+
"name": "ipython",
164+
"version": 3
165+
},
166+
"file_extension": ".py",
167+
"mimetype": "text/x-python",
168+
"name": "python",
169+
"nbconvert_exporter": "python",
170+
"pygments_lexer": "ipython3",
171+
"version": "3.9.5"
172+
},
173+
"orig_nbformat": 2,
174+
"coopTranslator": {
175+
"original_hash": "6fa055f484eb5d6bdf41166a356d3abf",
176+
"translation_date": "2025-08-31T10:13:14+00:00",
177+
"source_file": "lessons/3-NeuralNetworks/04-OwnFramework/lab/MyFW_MNIST.ipynb",
178+
"language_code": "hk"
179+
}
180+
},
181+
"nbformat": 4,
182+
"nbformat_minor": 2
183+
}

0 commit comments

Comments
 (0)