Skip to content

Commit

Permalink
Update course book
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 26, 2024
1 parent 47cc187 commit c1226fd
Show file tree
Hide file tree
Showing 156 changed files with 30,593 additions and 27,595 deletions.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@
"execution": {}
},
"source": [
"We build a simple interface in `gradio` to try out the model interactively. Go ahead and try some example text to see how it works. You can use images from the internet, or scan your own handwriting. Just make sure that the text fits on one line."
"We build a simple interface in `gradio` to try out the model interactively. Go ahead and try some example text to see how it works. You can use images from the internet, or scan your own handwriting. Just make sure that the text fits on one line. Observe the result of the recognized text."
]
},
{
Expand Down Expand Up @@ -1167,7 +1167,7 @@
" ############################################################\n",
" # Fill in this code to calculate character error rate and word error rate.\n",
" # Hint: have a look at the torchmetrics documentation for the proper\n",
" # metrics.\n",
" # metrics (type the proper metric name in the search bar).\n",
" #\n",
" # https://lightning.ai/docs/torchmetrics/stable/\n",
" raise NotImplementedError(\"Student has to fill in these lines\")\n",
Expand Down Expand Up @@ -1774,7 +1774,7 @@
"execution": {}
},
"source": [
"### Code exercise 3.1: Understanding the inputs and outputs of the decoder\n",
"### Code exercise 3.1: Understanding the inputs and outputs of the encoder\n",
"\n",
"Let's make sure we understand how the encoder operates by giving it a sample input and checking that its output matches the expected shape."
]
Expand All @@ -1788,9 +1788,9 @@
},
"outputs": [],
"source": [
"def inspect_decoder(model):\n",
"def inspect_encoder(model):\n",
" \"\"\"\n",
" Inspect decoder to verify that it processes inputs in the expected way.\n",
" Inspect encoder to verify that it processes inputs in the expected way.\n",
"\n",
" Args:\n",
" model: the TrOCR model\n",
Expand Down Expand Up @@ -1826,7 +1826,7 @@
"execution": {}
},
"source": [
"[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W1D1_Generalization/solutions/W1D1_Tutorial1_Solution_fe1c0573.py)\n",
"[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W1D1_Generalization/solutions/W1D1_Tutorial1_Solution_22613224.py)\n",
"\n"
]
},
Expand All @@ -1839,7 +1839,7 @@
},
"outputs": [],
"source": [
"inspect_decoder(model)"
"inspect_encoder(model)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,8 @@
"\n",
"$$z = \\mathbf{W}\\mathbf{r} + c$$\n",
"\n",
"In this notation, we can interpret $\\mathbf{r}$ as the firing rates of the neurons. Take a look at the equation above: the hidden state, $\\mathbf{x}$ (representation of stimuli in the brain), is evolving over time and is driven by current stimuli input $\\mathbf{u}$ and firing rates of neurons in the previous time step, $\\mathbf{r}$. EMG activity, $z$, is a direct linear projection from firing rates. \n",
"\n",
"Let's code up this unregularized neural network."
]
},
Expand Down Expand Up @@ -1370,7 +1372,7 @@
" #################################################\n",
" inputs = inputs.to(device)\n",
" batch_size = inputs.size(0)\n",
" h = ...\n",
" h = ... #note that `UnregularizedRNN` has a specific method for that\n",
"\n",
" loss = 0\n",
" outputs = []\n",
Expand All @@ -1396,7 +1398,7 @@
"execution": {}
},
"source": [
"[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W1D1_Generalization/solutions/W1D1_Tutorial2_Solution_dc6b3d2e.py)\n",
"[*Click for solution*](https://github.com/neuromatch/NeuroAI_Course/tree/main/tutorials/W1D1_Generalization/solutions/W1D1_Tutorial2_Solution_c14a4735.py)\n",
"\n"
]
},
Expand Down Expand Up @@ -1809,7 +1811,7 @@
" # Project the firing rate linearly to form the output\n",
" output = self.output_linear(firing_rate)\n",
"\n",
" # Regularization terms\n",
" # Regularization terms (used for R1 calculation)\n",
" firing_rate_reg = firing_rate.pow(2).sum()\n",
"\n",
" return output, hidden, firing_rate_reg\n",
Expand Down Expand Up @@ -1961,7 +1963,7 @@
"source": [
"## Activity 3.2: Comparing trained RNN with real data\n",
"\n",
"Let's see if this regularized network's activity is aligned with the brain."
"Let's see if this regularized network's activity is aligned with the brain. PSTH (peristimulus time histogram) is the type of plot that shows the firing rates of neurons over time (or their actual firings, depending on the granularity level)."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,30 +724,6 @@
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e7888898-2483-4705-97dc-a0099ef7b5cd",
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"test_embeddings_untrained[0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5e6b3578-912c-4f96-9fd2-e6add908cb4a",
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"test_embeddings_untrained[2]"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
16 changes: 8 additions & 8 deletions projects/project-notebooks/ComparingNetworks.html
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ <h3>Install and import feedback gadget<a class="headerlink" href="#install-and-i
<h3>Project Background<a class="headerlink" href="#project-background" title="Permalink to this heading">#</a></h3>
<div class="cell tag_remove-input docutils container">
<div class="cell_output docutils container">
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "068fbb7c332f46b7814f3de2d27f2c09"}</script></div>
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "c1fdf823c0f742a5b4bb8a9d62ac8fea"}</script></div>
</div>
</section>
<section id="submit-your-feedback">
Expand All @@ -1242,7 +1242,7 @@ <h3>Submit your feedback<a class="headerlink" href="#submit-your-feedback" title
</div>
</details>
<div class="cell_output docutils container">
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "cd27a2559ba049cca4d55bccbfb3a9f4"}</script></div>
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "14df630b76af436b9ce32479d837b85a"}</script></div>
</div>
</section>
<section id="project-slides">
Expand Down Expand Up @@ -1305,7 +1305,7 @@ <h3>Submit your feedback<a class="headerlink" href="#id1" title="Permalink to th
</div>
</details>
<div class="cell_output docutils container">
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "d4b90aabaf324d61b99df28d77f18cfc"}</script></div>
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "d9398321b5544f8aad3dab8382e2f788"}</script></div>
</div>
<p>In this notebook, we are going to provide code to get you started on Q1-Q3 of this project!</p>
<p>The basic outline looks like this:</p>
Expand Down Expand Up @@ -1495,7 +1495,7 @@ <h3>Submit your feedback<a class="headerlink" href="#id2" title="Permalink to th
</div>
</details>
<div class="cell_output docutils container">
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "d008651a846d4de09fa411e4ce67bf38"}</script></div>
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "b8312c5ddf144953ad1dfcd6258289e5"}</script></div>
</div>
</section>
</section>
Expand Down Expand Up @@ -1562,7 +1562,7 @@ <h3>Submit your feedback<a class="headerlink" href="#id3" title="Permalink to th
</div>
</details>
<div class="cell_output docutils container">
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "48a1f6c834974370954e3d4517797b15"}</script></div>
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "5b2abf0c923843d3bb9e819b4189e3cb"}</script></div>
</div>
</section>
</section>
Expand Down Expand Up @@ -1597,7 +1597,7 @@ <h2>Section 3: Understanding the Three-Bit Flip-Flop task (3BFF)<a class="header
</div>
</div>
<div class="cell_output docutils container">
<img alt="../../_images/9dc92a37d20a89960b2fd3a6743f0d91d4424bb976cab816c1be341a19204acc.png" src="../../_images/9dc92a37d20a89960b2fd3a6743f0d91d4424bb976cab816c1be341a19204acc.png" />
<img alt="../../_images/29a08c08a3b7fbd1c355eb267884ec858ab9af2dec4884da28b2ce8b33c104e2.png" src="../../_images/29a08c08a3b7fbd1c355eb267884ec858ab9af2dec4884da28b2ce8b33c104e2.png" />
</div>
</div>
<p>Above, we are plotting the inputs and outputs of the 3BFF task. One trial is 500 time steps, each with a 1% probability of getting an “up” or “down” pulse on each of its 3 input channels. When the task receives an “up” pulse, the state corresponding to that input channel moves from zero to one (if possible), and if a state at one receives a “down” pulse, it goes to zero. In this way, this system acts as 3 bits of memory, encoding 8 potential system states (2^3 states). We add noise to the inputs of the system so that it better reflects realistic computations that a neural circuit might perform.</p>
Expand All @@ -1610,7 +1610,7 @@ <h2>Section 3: Understanding the Three-Bit Flip-Flop task (3BFF)<a class="header
</div>
</div>
<div class="cell_output docutils container">
<img alt="../../_images/b896b5ee7a145840f59d5258dd0e982511fe6c5421343aa990d42f202dc31084.png" src="../../_images/b896b5ee7a145840f59d5258dd0e982511fe6c5421343aa990d42f202dc31084.png" />
<img alt="../../_images/500d3e5668d9440f586decc939ee3b5e63c7d23ecd45f033d358e64d9b6264f3.png" src="../../_images/500d3e5668d9440f586decc939ee3b5e63c7d23ecd45f033d358e64d9b6264f3.png" />
</div>
</div>
<p>Now that we can see the basic logic of the task, let’s do a basic overview of what task training is!</p>
Expand All @@ -1634,7 +1634,7 @@ <h3>Submit your feedback<a class="headerlink" href="#id4" title="Permalink to th
</div>
</details>
<div class="cell_output docutils container">
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "ea1578f658244e4186e3704bf40c0425"}</script></div>
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "2bd3b26062ac4f0493841acc5fcb4931"}</script></div>
</div>
</section>
</section>
Expand Down
56,659 changes: 29,880 additions & 26,779 deletions projects/project-notebooks/Macrocircuits.html

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions projects/project-notebooks/Microlearning.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tutorials/W1D1_Generalization/student/W1D1_Intro.html

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions tutorials/W1D1_Generalization/student/W1D1_Tutorial1.html

Large diffs are not rendered by default.

55 changes: 28 additions & 27 deletions tutorials/W1D1_Generalization/student/W1D1_Tutorial2.html

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions tutorials/W1D1_Generalization/student/W1D1_Tutorial3.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tutorials/W1D2_ComparingTasks/student/W1D2_Intro.html

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions tutorials/W1D2_ComparingTasks/student/W1D2_Tutorial1.html

Large diffs are not rendered by default.

104 changes: 12 additions & 92 deletions tutorials/W1D2_ComparingTasks/student/W1D2_Tutorial2.html

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions tutorials/W1D2_ComparingTasks/student/W1D2_Tutorial3.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tutorials/W1D5_Microcircuits/student/W1D5_Intro.html

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions tutorials/W1D5_Microcircuits/student/W1D5_Tutorial1.html

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions tutorials/W1D5_Microcircuits/student/W1D5_Tutorial2.html

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions tutorials/W1D5_Microcircuits/student/W1D5_Tutorial3.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tutorials/W2D1_Macrocircuits/student/W2D1_Intro.html

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions tutorials/W2D1_Macrocircuits/student/W2D1_Tutorial1.html

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions tutorials/W2D1_Macrocircuits/student/W2D1_Tutorial2.html

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions tutorials/W2D1_Macrocircuits/student/W2D1_Tutorial3.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tutorials/W2D2_NeuroSymbolicMethods/student/W2D2_Intro.html

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions tutorials/W2D2_NeuroSymbolicMethods/student/W2D2_Tutorial1.html

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions tutorials/W2D2_NeuroSymbolicMethods/student/W2D2_Tutorial2.html

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions tutorials/W2D2_NeuroSymbolicMethods/student/W2D2_Tutorial3.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tutorials/W2D3_Microlearning/student/W2D3_Intro.html

Large diffs are not rendered by default.

152 changes: 76 additions & 76 deletions tutorials/W2D3_Microlearning/student/W2D3_Tutorial1.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tutorials/W2D4_Macrolearning/student/W2D4_Intro.html

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions tutorials/W2D4_Macrolearning/student/W2D4_Tutorial1.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions tutorials/W2D4_Macrolearning/student/W2D4_Tutorial2.html

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions tutorials/W2D4_Macrolearning/student/W2D4_Tutorial3.html

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions tutorials/W2D4_Macrolearning/student/W2D4_Tutorial4.html

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions tutorials/W2D4_Macrolearning/student/W2D4_Tutorial5.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tutorials/W2D5_Mysteries/student/W2D5_Intro.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tutorials/W2D5_Mysteries/student/W2D5_Outro.html

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions tutorials/W2D5_Mysteries/student/W2D5_Tutorial1.html

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions tutorials/W2D5_Mysteries/student/W2D5_Tutorial2.html

Large diffs are not rendered by default.

0 comments on commit c1226fd

Please sign in to comment.