Discrete Hopfield Network (DHNN) implemented with Python
Project description
DHNN
DHNN is a minimalistic and Numpy based implementation of the Discrete Hopfield Network. DHNN can learn (memorize) patterns and remember (recover) the patterns when the network feeds those with noises.
Installation
Just use pip:
pip install dhnn
Or download dhnn
to a directory which your choice and use setup
to install script:
python setup.py install
Prerequisites
Prior to running this package, please install the following libraries.
numpy
Example (Image Restoration)
Step1
Input a neat picture like this(yosukekatada's smile face).
Step2
Get the network to memorize the pattern, this program will automatically transform RGB Jpg into black-white picture.
Step3
After the network memorized it, put the picture with noise like this(yosukekatada's smile face with sunglasses) into the network.
Step4
The network can strip off the sunglasses, because the network ready remembers the former picture.
Authors
yosukekatada | Zeroto521 |
TODO
- more flag, add 0/1 flag or other flag.
- optimize loop, try numba, Cpython or any other ways.
- optimize memory.
License
MIT License. @yosukekatada, @Zeroto521
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file dhnn-0.1.8.tar.gz
.
File metadata
- Download URL: dhnn-0.1.8.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.14.2 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b55f2ee7adaa741699b81525b25ebf004f6147f5640254243a42b3b6de5d023 |
|
MD5 | b7540fa19622c933ac3019e64768c594 |
|
BLAKE2b-256 | e358cf9f043f489ffd3c7d788340504dcae9dfb4f9515f61d022d4d6af531f1d |