Hopfield network (Amari-Hopfield network) implemented with Python. Two update rules are implemented: Asynchronous & Synchronous.
Run train.py
or train_mnist.py
.
The following is the result of using Synchronous update.
Start to data preprocessing...
Start to train weights...
100%|██████████| 4/4 [00:06<00:00, 1.67s/it]
Start to predict...
100%|██████████| 4/4 [00:02<00:00, 1.80it/s]
Show prediction results...
Show network weights matrix...
The following is the result of using Asynchronous update.
Start to data preprocessing...
Start to train weights...
100%|██████████| 3/3 [00:00<00:00, 274.99it/s]
Start to predict...
100%|██████████| 3/3 [00:00<00:00, 32.52it/s]
Show prediction results...
Show network weights matrix...