https://github.com/contextlab/hopfield-demo
Demo hopfield network code
https://github.com/contextlab/hopfield-demo
Last synced: 4 months ago
JSON representation
Demo hopfield network code
- Host: GitHub
- URL: https://github.com/contextlab/hopfield-demo
- Owner: ContextLab
- License: mit
- Created: 2018-02-16T19:29:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-16T19:34:21.000Z (over 8 years ago)
- Last Synced: 2025-05-15T00:18:33.213Z (about 1 year ago)
- Language: Matlab
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
Demo Hopfield network code.
# Running the demo
After cloning this repository and adding it to your MATLAB path, run the demo by typing (in the MATLAB command window):
`hopfield_simulation(D, N)` (where `D` is the number of neurons in the hopfield network and `N` is the number of memories to encode).
This will create `N` random memories (of `D` features each) and a random `D`-dimensional cue.
When you press any key, those memories will be encoded into the network (modifying the weight matrix) and the plot will be updated.
When you press any key a second time, the network will simulate "retrieval" by using aynchronous updates, starting from the cued memory state. The simulation will stop when the network converges.