Implementing from scratch a Hopfield Network
A while ago I posted about Hopfield Networks. I wanted to further explore this theme by trying to implement this type of idea from scratch in python.
Here is the link to my code: GitHub
The whole thing is small enough to run in a browser, so here it is — the same from-scratch network, 144 neurons and three stored patterns, with the Hebbian weights and the asynchronous update rule written out in the widget source.
Some nice results are shown here:
The reconstruction of the images using associative memory of the network:
The weights of the hopfield network graph