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
Copy file name to clipboardExpand all lines: content/assignments/Assignment_1:Hopfield_Networks/README.md
+81-61Lines changed: 81 additions & 61 deletions
Original file line number
Diff line number
Diff line change
@@ -18,37 +18,43 @@ You should start by reading [Amit et al. (1985)](https://www.dropbox.com/scl/fi/
18
18
19
19
### 1. Implement Memory Storage and Retrieval
20
20
21
-
**Objective:** Write functions that implement the core operations of a Hopfield network.
21
+
#### Objective
22
22
23
-
-**Memory Storage:** Implement the Hebbian learning rule to compute the weight matrix, given a set of network configurations (memories). This is described in **Equation 1.5** of the paper:
23
+
Write functions that implement the core operations of a Hopfield network.
24
24
25
-
Let \$p\$ be the number of patterns and \$\xi_i^\mu \in \{-1, +1\}\$ the value of neuron \$i\$ in pattern \$\mu\$. The synaptic coupling between neurons \$i\$ and \$j\$ is:
25
+
#### Memory Storage
26
26
27
-
$$
28
-
J_{ij} = \sum_{\mu=1}^p \xi_i^\mu \xi_j^\mu
29
-
$$
27
+
Implement the Hebbian learning rule to compute the weight matrix, given a set of network configurations (memories). This is described in *Equation 1.5* of the paper:
30
28
31
-
Note that the matrix is symmetric (\$J_{ij} = J_{ji}\$), and there are no self-connections by definition (\$J_{ii} = 0\$).
29
+
Let $p$ be the number of patterns and $\xi_i^\mu \in \{-1, +1\}$ the value of neuron $i$ in pattern $\mu$. The synaptic coupling between neurons $i$ and $j$ is:
32
30
33
-
-**Memory Retrieval:** Implement the retrieval rule using **Equation 1.3** and surrounding discussion. At each time step, each neuron updates according to its **local field**:
31
+
$$
32
+
J_{ij} = \sum_{\mu=1}^p \xi_i^\mu \xi_j^\mu
33
+
$$
34
+
35
+
Note that the matrix is symmetric ($J_{ij} = J_{ji}$), and there are no self-connections by definition ($J_{ii} = 0$).
34
36
35
-
$$
36
-
h_i = \sum_{j=1}^N J_{ij} S_j
37
-
$$
37
+
#### Memory Retrieval
38
+
39
+
Implement the retrieval rule using *Equation 1.3* and surrounding discussion. At each time step, each neuron updates according to its local field:
40
+
41
+
$$
42
+
h_i = \sum_{j=1}^N J_{ij} S_j
43
+
$$
38
44
39
-
The neuron updates its state to align with the sign of the field:
45
+
Each neuron updates its state by aligning with the sign of the field:
0 commit comments