You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance Colab badge functionality: Update script to add 'Open in Colab' badges to both template and solution notebooks. Modify badge generation to accommodate different notebook directories and ensure proper processing of both templates and solutions.
"[](https://colab.research.google.com/github/duoan/TorchCode/blob/master/solutions/01_relu_solution.ipynb)\n",
9
+
"\n",
20
10
"# 🟢 Solution: Implement ReLU\n",
21
11
"\n",
22
12
"Reference solution for the ReLU activation function.\n",
23
13
"\n",
24
14
"$$\\text{ReLU}(x) = \\max(0, x)$$"
25
-
],
26
-
"outputs": []
15
+
]
27
16
},
28
17
{
29
18
"cell_type": "code",
19
+
"execution_count": null,
30
20
"metadata": {},
21
+
"outputs": [],
31
22
"source": [
32
-
"import torch"
33
-
],
23
+
"# Install torch-judge in Colab (no-op in JupyterLab/Docker)\n",
Copy file name to clipboardExpand all lines: solutions/02_softmax_solution.ipynb
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@
17
17
"cell_type": "markdown",
18
18
"metadata": {},
19
19
"source": [
20
+
"[](https://colab.research.google.com/github/duoan/TorchCode/blob/master/solutions/02_softmax_solution.ipynb)\n\n",
20
21
"# 🟢 Solution: Implement Softmax\n",
21
22
"\n",
22
23
"Reference solution for the numerically-stable Softmax function.\n",
@@ -25,6 +26,20 @@
25
26
],
26
27
"outputs": []
27
28
},
29
+
{
30
+
"cell_type": "code",
31
+
"metadata": {},
32
+
"source": [
33
+
"# Install torch-judge in Colab (no-op in JupyterLab/Docker)\n",
Copy file name to clipboardExpand all lines: solutions/03_linear_solution.ipynb
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,12 +17,27 @@
17
17
"cell_type": "markdown",
18
18
"metadata": {},
19
19
"source": [
20
+
"[](https://colab.research.google.com/github/duoan/TorchCode/blob/master/solutions/03_linear_solution.ipynb)\n\n",
20
21
"# 🟡 Solution: Simple Linear Layer\n",
21
22
"\n",
22
23
"Reference solution for a fully-connected linear layer: **y = xW^T + b**"
23
24
],
24
25
"outputs": []
25
26
},
27
+
{
28
+
"cell_type": "code",
29
+
"metadata": {},
30
+
"source": [
31
+
"# Install torch-judge in Colab (no-op in JupyterLab/Docker)\n",
Copy file name to clipboardExpand all lines: solutions/04_layernorm_solution.ipynb
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@
17
17
"cell_type": "markdown",
18
18
"metadata": {},
19
19
"source": [
20
+
"[](https://colab.research.google.com/github/duoan/TorchCode/blob/master/solutions/04_layernorm_solution.ipynb)\n\n",
20
21
"# 🟡 Solution: Implement LayerNorm\n",
21
22
"\n",
22
23
"Reference solution for Layer Normalization.\n",
@@ -25,6 +26,20 @@
25
26
],
26
27
"outputs": []
27
28
},
29
+
{
30
+
"cell_type": "code",
31
+
"metadata": {},
32
+
"source": [
33
+
"# Install torch-judge in Colab (no-op in JupyterLab/Docker)\n",
0 commit comments