diff --git a/generate_book_v2.py b/generate_book_v2.py
index 2298c8ea4..f221abf68 100644
--- a/generate_book_v2.py
+++ b/generate_book_v2.py
@@ -44,7 +44,7 @@ def main():
"children": [
{
"file": "tutorials/Schedule/schedule_intro.md",
- "short_title": "Overview",
+ "title": "Overview",
"children": [
{"file": "tutorials/Schedule/daily_schedules.md"},
{"file": "tutorials/Schedule/shared_calendars.md"},
@@ -62,11 +62,11 @@ def main():
"children": [
{
"file": "tutorials/TechnicalHelp/tech_intro.md",
- "short_title": "Overview",
+ "title": "Overview",
"children": [
{
"file": "tutorials/TechnicalHelp/Jupyterbook.md",
- "short_title": "Using Jupyterbook",
+ "title": "Using Jupyterbook",
"children": [
{"file": "tutorials/TechnicalHelp/Tutorial_colab.md"},
{"file": "tutorials/TechnicalHelp/Tutorial_kaggle.md"},
@@ -235,7 +235,7 @@ def convert_sections_to_children(entries):
return result
-# ---- Pre-processing helpers (ported verbatim from nmaci generate_book.py) ----
+ # ---- Pre-processing helpers (ported verbatim from nmaci generate_book.py) ----
def pre_process_notebook(file_path):
diff --git a/parse_build_for_errors_v2.py b/parse_build_for_errors_v2.py
index 190ca88a2..628fdcf56 100644
--- a/parse_build_for_errors_v2.py
+++ b/parse_build_for_errors_v2.py
@@ -14,8 +14,8 @@
└── children[K] (type='output')
jupyter_data: {output_type: 'error', ename: 'NotImplementedError', ...}
-We walk every .json file, find 'output' nodes whose jupyter_data.ename matches
-our error list, remove them from their parent 'outputs' node, and also remove
+We walk every .json file, find 'output' nodes whose jupyter_data.output_type
+is 'error', remove them from their parent 'outputs' node, and also remove
the 'outputs' node entirely if it becomes empty.
Run as: python parse_html_for_errors_v2.py student
@@ -27,8 +27,6 @@
sys.argv[1] # "student" or "instructor" — accepted but not used (kept for compat)
-ERROR_NAMES = {"NotImplementedError", "NameError"}
-
HTML_ROOT = "book/_build/html"
@@ -80,7 +78,7 @@ def strip_error_outputs(node):
"""Recursively walk the mdast tree and remove error output nodes.
Targets 'outputs' nodes (type='outputs') that contain one or more
- 'output' children with jupyter_data.ename in ERROR_NAMES.
+ 'output' children with jupyter_data.output_type == 'error'.
Returns count of individual error output nodes removed.
"""
@@ -125,11 +123,7 @@ def filter_error_outputs(outputs_node):
new_children.append(child)
continue
jd = child.get("jupyter_data", {})
- if (
- isinstance(jd, dict)
- and jd.get("output_type") == "error"
- and jd.get("ename") in ERROR_NAMES
- ):
+ if jd.get("output_type") == "error":
removed += 1
else:
new_children.append(child)
diff --git a/tutorials/W2D3_Microlearning/W2D3_Tutorial1.ipynb b/tutorials/W2D3_Microlearning/W2D3_Tutorial1.ipynb
index eb6569d93..dc192adbc 100644
--- a/tutorials/W2D3_Microlearning/W2D3_Tutorial1.ipynb
+++ b/tutorials/W2D3_Microlearning/W2D3_Tutorial1.ipynb
@@ -2,11 +2,14 @@
"cells": [
{
"cell_type": "markdown",
+ "id": "fad06d22",
"metadata": {
- "execution": {}
+ "colab_type": "text",
+ "execution": {},
+ "id": "view-in-github"
},
"source": [
- "
"
+ "
"
]
},
{
@@ -709,7 +712,6 @@
"execution": {}
},
"source": [
- "\n",
"$\n",
"\\newcommand{\\stim}{\\mathbf{x}}\n",
"\\newcommand{\\noisew}{\\boldsymbol \\Psi}\n",
@@ -721,11 +723,11 @@
"\\newcommand{\\weight}{\\mathbf{W}}\n",
"\\newcommand{\\loss}{\\mathcal{L}}\n",
"\\newcommand{\\derivative}[2]{\\frac{d#1}{d#2}}\n",
- "\\newcommand{\\pderivative}[2]{\\frac{\\partial#1}{\\partial#2}}\n",
+ "\\newcommand{\\pderivative}[2]{\\frac{\\partial#1}{\\partial #2}}\n",
"\\newcommand{\\rate}{\\mathbf{r}}\n",
"\\newcommand{\\T}{^{\\top}}\n",
"\\newcommand{\\RR}{\\mathbb{R}}\n",
- "\\newcommand{\\EE}{\\mathbb{E}\\,}\n",
+ "\\newcommand{\\EE}{\\mathbb{E}}\n",
"\\newcommand{\\brackets}[1]{\\left(#1\\right)}\n",
"\\newcommand{\\sqbrackets}[1]{\\left[#1\\right]}\n",
"\\newcommand{\\var}[1]{\\mathbb{V}\\mathrm{ar}\\brackets{#1}}$\n",
@@ -755,7 +757,7 @@
" \\Delta \\weight_{ij} &= - \\eta \\mathbb{E}_{\\noisew} \\left [\\left (\\derivative{\\loss}{\\weight}\\T \\noisew\\right ) \\frac{\\noisew_{ij}}{\\sigma^2} \\right ] \\\\\n",
" &= - \\eta \\derivative{\\loss}{\\weight_{ij}},\n",
"\\end{align}\n",
- "where this last equality follows from the fact that $\\mathbb{E}_{\\noisew} \\left[\\noisew_{ij} \\noisew_{kl} \\right] = \\sigma^2$ if and only if $i = k$ and $j = l$, and is 0 otherwise. Therefore, in expectation over many noise samples $\\noisew$, our parameter update based purely on measuring how perturbations of the weights $\\weight'$ correlate with changes in the loss function $\\loss(\\noisew)$, ends up being an unbiased approximation of gradient descent.\n"
+ "where this last equality follows from the fact that $\\mathbb{E}_{\\noisew} \\left[\\noisew_{ij} \\noisew_{kl} \\right] = \\sigma^2$ if and only if $i = k$ and $j = l$, and is 0 otherwise. Therefore, in expectation over many noise samples $\\noisew$, our parameter update based purely on measuring how perturbations of the weights $\\weight'$ correlate with changes in the loss function $\\loss(\\noisew)$, ends up being an unbiased approximation of gradient descent."
]
},
{
@@ -1229,14 +1231,14 @@
"$\\newcommand{\\rate}{\\mathbf{r}}$\n",
"$\\newcommand{\\T}{^{\\top}}$\n",
"$\\newcommand{\\RR}{\\mathbb{R}}$\n",
- "$\\newcommand{\\EE}{\\mathbb{E}\\,}$\n",
+ "$\\newcommand{\\EE}{\\mathbb{E}}$\n",
"$\\newcommand{\\brackets}[1]{\\left(#1\\right)}$\n",
"$\\newcommand{\\sqbrackets}[1]{\\left[#1\\right]}$\n",
"$\\newcommand{\\var}[1]{\\mathbb{V}\\mathrm{ar}\\brackets{#1}}$\n",
"\n",
"The main issue of perturbation methods is noise, meaning that across many samples of input stimuli and network perturbations, the gradient estimates will be much more variable than would be the case for backpropagation. This means that many, many more perturbations/training samples will be required to obtain an accurate gradient estimate: the consequence will be either very slow or much less effective learning. \n",
"\n",
- "Here, we will demonstrate the noisiness of these learning algorithms analytically for a simplified loss and network. This derivation is principally to satisfy your curiosity: no subsequent exercises will depend on your understanding of the mathematics here, and we will subsequently provide empirical evidence based on network simulations as well. First, we will work with a linear network so $\\widehat\\targetdim =\\weight\\stim$, where $\\widehat\\targetdim\\in\\RR^M$, $\\weight\\in\\RR^{M\\times N}$ and $\\stim\\in\\RR^N$. Second, we will assume that the target output is zero $\\targetdim=0$, so the loss becomes $\\loss(\\weight)=\\frac{1}{2}\\|\\weight\\stim\\|^2_2$. (This is equivalent to saying that $\\targetdim=\\weight^*\\stim$ and then shifting the actual weights to be $\\weight - \\weight^*$; notice that here we treat the loss as a function of $\\weight$, rather than $\\Delta \\weight$.)\n",
+ "Here, we will demonstrate the noisiness of these learning algorithms analytically for a simplified loss and network. This derivation is principally to satisfy your curiosity: no subsequent exercises will depend on your understanding of the mathematics here, and we will subsequently provide empirical evidence based on network simulations as well. First, we will work with a linear network so $\\mathbf{\\widehat{y}} =\\weight\\stim$, where $\\mathbf{\\widehat{y}}\\in\\RR^M$, $\\weight\\in\\RR^{M\\times N}$ and $\\stim\\in\\RR^N$. Second, we will assume that the target output is zero $\\targetdim=0$, so the loss becomes $\\loss(\\weight)=\\frac{1}{2}\\|\\weight\\stim\\|^2_2$. (This is equivalent to saying that $\\targetdim=\\weight^*\\stim$ and then shifting the actual weights to be $\\weight - \\weight^*$; notice that here we treat the loss as a function of $\\weight$, rather than $\\Delta \\weight$.)\n",
"\n",
"\n",
"With these changes, we will compute the variance of weight updates for a given input $\\stim$, i.e.\n",
@@ -1515,7 +1517,6 @@
"execution": {}
},
"source": [
- "\n",
"$\\newcommand{\\stim}{\\mathbf{x}}$\n",
"$\\newcommand{\\h}{\\mathbf{h}}$\n",
"$\\newcommand{\\noisew}{\\boldsymbol \\Psi}$\n",
@@ -1875,8 +1876,6 @@
"execution": {}
},
"source": [
- "\n",
- "\n",
"$\\newcommand{\\error}{\\boldsymbol \\delta}$\n",
"$\\newcommand{\\losserror}{\\mathbf{e}}$\n",
"$\\newcommand{\\backweight}{\\mathbf{B}}$\n",
@@ -2097,7 +2096,7 @@
"---\n",
"# Section 6: Assessing the bias of learning algorithms\n",
"\n",
- "*Estimated timing to here from start of tutorial: 1 hour 50 minutes*\n"
+ "*Estimated timing to here from start of tutorial: 1 hour 50 minutes*"
]
},
{
@@ -2249,7 +2248,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.19"
+ "version": "3.10.20"
}
},
"nbformat": 4,
diff --git a/tutorials/W2D3_Microlearning/instructor/W2D3_Tutorial1.ipynb b/tutorials/W2D3_Microlearning/instructor/W2D3_Tutorial1.ipynb
index 23ebb4cde..8fab9be75 100644
--- a/tutorials/W2D3_Microlearning/instructor/W2D3_Tutorial1.ipynb
+++ b/tutorials/W2D3_Microlearning/instructor/W2D3_Tutorial1.ipynb
@@ -2,11 +2,14 @@
"cells": [
{
"cell_type": "markdown",
+ "id": "04ef02e8",
"metadata": {
- "execution": {}
+ "colab_type": "text",
+ "execution": {},
+ "id": "view-in-github"
},
"source": [
- "
"
+ "
"
]
},
{
@@ -709,7 +712,6 @@
"execution": {}
},
"source": [
- "\n",
"$\n",
"\\newcommand{\\stim}{\\mathbf{x}}\n",
"\\newcommand{\\noisew}{\\boldsymbol \\Psi}\n",
@@ -721,11 +723,11 @@
"\\newcommand{\\weight}{\\mathbf{W}}\n",
"\\newcommand{\\loss}{\\mathcal{L}}\n",
"\\newcommand{\\derivative}[2]{\\frac{d#1}{d#2}}\n",
- "\\newcommand{\\pderivative}[2]{\\frac{\\partial#1}{\\partial#2}}\n",
+ "\\newcommand{\\pderivative}[2]{\\frac{\\partial#1}{\\partial #2}}\n",
"\\newcommand{\\rate}{\\mathbf{r}}\n",
"\\newcommand{\\T}{^{\\top}}\n",
"\\newcommand{\\RR}{\\mathbb{R}}\n",
- "\\newcommand{\\EE}{\\mathbb{E}\\,}\n",
+ "\\newcommand{\\EE}{\\mathbb{E}}\n",
"\\newcommand{\\brackets}[1]{\\left(#1\\right)}\n",
"\\newcommand{\\sqbrackets}[1]{\\left[#1\\right]}\n",
"\\newcommand{\\var}[1]{\\mathbb{V}\\mathrm{ar}\\brackets{#1}}$\n",
@@ -755,7 +757,7 @@
" \\Delta \\weight_{ij} &= - \\eta \\mathbb{E}_{\\noisew} \\left [\\left (\\derivative{\\loss}{\\weight}\\T \\noisew\\right ) \\frac{\\noisew_{ij}}{\\sigma^2} \\right ] \\\\\n",
" &= - \\eta \\derivative{\\loss}{\\weight_{ij}},\n",
"\\end{align}\n",
- "where this last equality follows from the fact that $\\mathbb{E}_{\\noisew} \\left[\\noisew_{ij} \\noisew_{kl} \\right] = \\sigma^2$ if and only if $i = k$ and $j = l$, and is 0 otherwise. Therefore, in expectation over many noise samples $\\noisew$, our parameter update based purely on measuring how perturbations of the weights $\\weight'$ correlate with changes in the loss function $\\loss(\\noisew)$, ends up being an unbiased approximation of gradient descent.\n"
+ "where this last equality follows from the fact that $\\mathbb{E}_{\\noisew} \\left[\\noisew_{ij} \\noisew_{kl} \\right] = \\sigma^2$ if and only if $i = k$ and $j = l$, and is 0 otherwise. Therefore, in expectation over many noise samples $\\noisew$, our parameter update based purely on measuring how perturbations of the weights $\\weight'$ correlate with changes in the loss function $\\loss(\\noisew)$, ends up being an unbiased approximation of gradient descent."
]
},
{
@@ -1231,14 +1233,14 @@
"$\\newcommand{\\rate}{\\mathbf{r}}$\n",
"$\\newcommand{\\T}{^{\\top}}$\n",
"$\\newcommand{\\RR}{\\mathbb{R}}$\n",
- "$\\newcommand{\\EE}{\\mathbb{E}\\,}$\n",
+ "$\\newcommand{\\EE}{\\mathbb{E}}$\n",
"$\\newcommand{\\brackets}[1]{\\left(#1\\right)}$\n",
"$\\newcommand{\\sqbrackets}[1]{\\left[#1\\right]}$\n",
"$\\newcommand{\\var}[1]{\\mathbb{V}\\mathrm{ar}\\brackets{#1}}$\n",
"\n",
"The main issue of perturbation methods is noise, meaning that across many samples of input stimuli and network perturbations, the gradient estimates will be much more variable than would be the case for backpropagation. This means that many, many more perturbations/training samples will be required to obtain an accurate gradient estimate: the consequence will be either very slow or much less effective learning. \n",
"\n",
- "Here, we will demonstrate the noisiness of these learning algorithms analytically for a simplified loss and network. This derivation is principally to satisfy your curiosity: no subsequent exercises will depend on your understanding of the mathematics here, and we will subsequently provide empirical evidence based on network simulations as well. First, we will work with a linear network so $\\widehat\\targetdim =\\weight\\stim$, where $\\widehat\\targetdim\\in\\RR^M$, $\\weight\\in\\RR^{M\\times N}$ and $\\stim\\in\\RR^N$. Second, we will assume that the target output is zero $\\targetdim=0$, so the loss becomes $\\loss(\\weight)=\\frac{1}{2}\\|\\weight\\stim\\|^2_2$. (This is equivalent to saying that $\\targetdim=\\weight^*\\stim$ and then shifting the actual weights to be $\\weight - \\weight^*$; notice that here we treat the loss as a function of $\\weight$, rather than $\\Delta \\weight$.)\n",
+ "Here, we will demonstrate the noisiness of these learning algorithms analytically for a simplified loss and network. This derivation is principally to satisfy your curiosity: no subsequent exercises will depend on your understanding of the mathematics here, and we will subsequently provide empirical evidence based on network simulations as well. First, we will work with a linear network so $\\mathbf{\\widehat{y}} =\\weight\\stim$, where $\\mathbf{\\widehat{y}}\\in\\RR^M$, $\\weight\\in\\RR^{M\\times N}$ and $\\stim\\in\\RR^N$. Second, we will assume that the target output is zero $\\targetdim=0$, so the loss becomes $\\loss(\\weight)=\\frac{1}{2}\\|\\weight\\stim\\|^2_2$. (This is equivalent to saying that $\\targetdim=\\weight^*\\stim$ and then shifting the actual weights to be $\\weight - \\weight^*$; notice that here we treat the loss as a function of $\\weight$, rather than $\\Delta \\weight$.)\n",
"\n",
"\n",
"With these changes, we will compute the variance of weight updates for a given input $\\stim$, i.e.\n",
@@ -1517,7 +1519,6 @@
"execution": {}
},
"source": [
- "\n",
"$\\newcommand{\\stim}{\\mathbf{x}}$\n",
"$\\newcommand{\\h}{\\mathbf{h}}$\n",
"$\\newcommand{\\noisew}{\\boldsymbol \\Psi}$\n",
@@ -1879,8 +1880,6 @@
"execution": {}
},
"source": [
- "\n",
- "\n",
"$\\newcommand{\\error}{\\boldsymbol \\delta}$\n",
"$\\newcommand{\\losserror}{\\mathbf{e}}$\n",
"$\\newcommand{\\backweight}{\\mathbf{B}}$\n",
@@ -2103,7 +2102,7 @@
"---\n",
"# Section 6: Assessing the bias of learning algorithms\n",
"\n",
- "*Estimated timing to here from start of tutorial: 1 hour 50 minutes*\n"
+ "*Estimated timing to here from start of tutorial: 1 hour 50 minutes*"
]
},
{
@@ -2255,7 +2254,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.19"
+ "version": "3.10.20"
}
},
"nbformat": 4,
diff --git a/tutorials/W2D3_Microlearning/student/W2D3_Tutorial1.ipynb b/tutorials/W2D3_Microlearning/student/W2D3_Tutorial1.ipynb
index 33ce26a57..06aa09fe9 100644
--- a/tutorials/W2D3_Microlearning/student/W2D3_Tutorial1.ipynb
+++ b/tutorials/W2D3_Microlearning/student/W2D3_Tutorial1.ipynb
@@ -2,8 +2,11 @@
"cells": [
{
"cell_type": "markdown",
+ "id": "2dcf1420",
"metadata": {
- "execution": {}
+ "colab_type": "text",
+ "execution": {},
+ "id": "view-in-github"
},
"source": [
"
"
@@ -709,7 +712,6 @@
"execution": {}
},
"source": [
- "\n",
"$\n",
"\\newcommand{\\stim}{\\mathbf{x}}\n",
"\\newcommand{\\noisew}{\\boldsymbol \\Psi}\n",
@@ -721,11 +723,11 @@
"\\newcommand{\\weight}{\\mathbf{W}}\n",
"\\newcommand{\\loss}{\\mathcal{L}}\n",
"\\newcommand{\\derivative}[2]{\\frac{d#1}{d#2}}\n",
- "\\newcommand{\\pderivative}[2]{\\frac{\\partial#1}{\\partial#2}}\n",
+ "\\newcommand{\\pderivative}[2]{\\frac{\\partial#1}{\\partial #2}}\n",
"\\newcommand{\\rate}{\\mathbf{r}}\n",
"\\newcommand{\\T}{^{\\top}}\n",
"\\newcommand{\\RR}{\\mathbb{R}}\n",
- "\\newcommand{\\EE}{\\mathbb{E}\\,}\n",
+ "\\newcommand{\\EE}{\\mathbb{E}}\n",
"\\newcommand{\\brackets}[1]{\\left(#1\\right)}\n",
"\\newcommand{\\sqbrackets}[1]{\\left[#1\\right]}\n",
"\\newcommand{\\var}[1]{\\mathbb{V}\\mathrm{ar}\\brackets{#1}}$\n",
@@ -755,7 +757,7 @@
" \\Delta \\weight_{ij} &= - \\eta \\mathbb{E}_{\\noisew} \\left [\\left (\\derivative{\\loss}{\\weight}\\T \\noisew\\right ) \\frac{\\noisew_{ij}}{\\sigma^2} \\right ] \\\\\n",
" &= - \\eta \\derivative{\\loss}{\\weight_{ij}},\n",
"\\end{align}\n",
- "where this last equality follows from the fact that $\\mathbb{E}_{\\noisew} \\left[\\noisew_{ij} \\noisew_{kl} \\right] = \\sigma^2$ if and only if $i = k$ and $j = l$, and is 0 otherwise. Therefore, in expectation over many noise samples $\\noisew$, our parameter update based purely on measuring how perturbations of the weights $\\weight'$ correlate with changes in the loss function $\\loss(\\noisew)$, ends up being an unbiased approximation of gradient descent.\n"
+ "where this last equality follows from the fact that $\\mathbb{E}_{\\noisew} \\left[\\noisew_{ij} \\noisew_{kl} \\right] = \\sigma^2$ if and only if $i = k$ and $j = l$, and is 0 otherwise. Therefore, in expectation over many noise samples $\\noisew$, our parameter update based purely on measuring how perturbations of the weights $\\weight'$ correlate with changes in the loss function $\\loss(\\noisew)$, ends up being an unbiased approximation of gradient descent."
]
},
{
@@ -826,8 +828,7 @@
"execution": {}
},
"source": [
- "[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W2D3_Microlearning/solutions/W2D3_Tutorial1_Solution_01f74aae.py)\n",
- "\n"
+ "[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W2D3_Microlearning/solutions/W2D3_Tutorial1_Solution_01f74aae.py)"
]
},
{
@@ -1205,14 +1206,14 @@
"$\\newcommand{\\rate}{\\mathbf{r}}$\n",
"$\\newcommand{\\T}{^{\\top}}$\n",
"$\\newcommand{\\RR}{\\mathbb{R}}$\n",
- "$\\newcommand{\\EE}{\\mathbb{E}\\,}$\n",
+ "$\\newcommand{\\EE}{\\mathbb{E}}$\n",
"$\\newcommand{\\brackets}[1]{\\left(#1\\right)}$\n",
"$\\newcommand{\\sqbrackets}[1]{\\left[#1\\right]}$\n",
"$\\newcommand{\\var}[1]{\\mathbb{V}\\mathrm{ar}\\brackets{#1}}$\n",
"\n",
"The main issue of perturbation methods is noise, meaning that across many samples of input stimuli and network perturbations, the gradient estimates will be much more variable than would be the case for backpropagation. This means that many, many more perturbations/training samples will be required to obtain an accurate gradient estimate: the consequence will be either very slow or much less effective learning. \n",
"\n",
- "Here, we will demonstrate the noisiness of these learning algorithms analytically for a simplified loss and network. This derivation is principally to satisfy your curiosity: no subsequent exercises will depend on your understanding of the mathematics here, and we will subsequently provide empirical evidence based on network simulations as well. First, we will work with a linear network so $\\widehat\\targetdim =\\weight\\stim$, where $\\widehat\\targetdim\\in\\RR^M$, $\\weight\\in\\RR^{M\\times N}$ and $\\stim\\in\\RR^N$. Second, we will assume that the target output is zero $\\targetdim=0$, so the loss becomes $\\loss(\\weight)=\\frac{1}{2}\\|\\weight\\stim\\|^2_2$. (This is equivalent to saying that $\\targetdim=\\weight^*\\stim$ and then shifting the actual weights to be $\\weight - \\weight^*$; notice that here we treat the loss as a function of $\\weight$, rather than $\\Delta \\weight$.)\n",
+ "Here, we will demonstrate the noisiness of these learning algorithms analytically for a simplified loss and network. This derivation is principally to satisfy your curiosity: no subsequent exercises will depend on your understanding of the mathematics here, and we will subsequently provide empirical evidence based on network simulations as well. First, we will work with a linear network so $\\mathbf{\\widehat{y}} =\\weight\\stim$, where $\\mathbf{\\widehat{y}}\\in\\RR^M$, $\\weight\\in\\RR^{M\\times N}$ and $\\stim\\in\\RR^N$. Second, we will assume that the target output is zero $\\targetdim=0$, so the loss becomes $\\loss(\\weight)=\\frac{1}{2}\\|\\weight\\stim\\|^2_2$. (This is equivalent to saying that $\\targetdim=\\weight^*\\stim$ and then shifting the actual weights to be $\\weight - \\weight^*$; notice that here we treat the loss as a function of $\\weight$, rather than $\\Delta \\weight$.)\n",
"\n",
"\n",
"With these changes, we will compute the variance of weight updates for a given input $\\stim$, i.e.\n",
@@ -1491,7 +1492,6 @@
"execution": {}
},
"source": [
- "\n",
"$\\newcommand{\\stim}{\\mathbf{x}}$\n",
"$\\newcommand{\\h}{\\mathbf{h}}$\n",
"$\\newcommand{\\noisew}{\\boldsymbol \\Psi}$\n",
@@ -1608,8 +1608,7 @@
"execution": {}
},
"source": [
- "[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W2D3_Microlearning/solutions/W2D3_Tutorial1_Solution_d1bc17ea.py)\n",
- "\n"
+ "[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W2D3_Microlearning/solutions/W2D3_Tutorial1_Solution_d1bc17ea.py)"
]
},
{
@@ -1829,8 +1828,6 @@
"execution": {}
},
"source": [
- "\n",
- "\n",
"$\\newcommand{\\error}{\\boldsymbol \\delta}$\n",
"$\\newcommand{\\losserror}{\\mathbf{e}}$\n",
"$\\newcommand{\\backweight}{\\mathbf{B}}$\n",
@@ -1937,8 +1934,7 @@
"execution": {}
},
"source": [
- "[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W2D3_Microlearning/solutions/W2D3_Tutorial1_Solution_95265523.py)\n",
- "\n"
+ "[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W2D3_Microlearning/solutions/W2D3_Tutorial1_Solution_95265523.py)"
]
},
{
@@ -2026,7 +2022,7 @@
"---\n",
"# Section 6: Assessing the bias of learning algorithms\n",
"\n",
- "*Estimated timing to here from start of tutorial: 1 hour 50 minutes*\n"
+ "*Estimated timing to here from start of tutorial: 1 hour 50 minutes*"
]
},
{
@@ -2178,7 +2174,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.19"
+ "version": "3.10.20"
}
},
"nbformat": 4,