https://github.com/srowen/autoenc-neurons
Simple example of Keras, TensorFlow and autoencoders applied to text
https://github.com/srowen/autoenc-neurons
autoencoder gpu gutenberg jane-austen keras neurons tensorflow
Last synced: 2 months ago
JSON representation
Simple example of Keras, TensorFlow and autoencoders applied to text
- Host: GitHub
- URL: https://github.com/srowen/autoenc-neurons
- Owner: srowen
- License: apache-2.0
- Archived: true
- Created: 2017-07-23T10:46:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-30T23:16:05.000Z (over 7 years ago)
- Last Synced: 2025-01-28T03:35:10.053Z (11 months ago)
- Topics: autoencoder, gpu, gutenberg, jane-austen, keras, neurons, tensorflow
- Language: Python
- Homepage:
- Size: 1.65 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# autoenc-neurons (work in progress)
An experiment with convolutional autoencoders as applied to text, and exploring what the
'neurons' in the convolutional layers respond to.
## Running
Note that if you do not have GPUs, you will need to edit the script to install `tensorflow`
instead of `tensorflow-gpu`, and change `gpu_count` to 0.
```bash
python3 autoenc-neurons.py
```
This will start model training and then produce output, at last, like this:

The output contains several lines from the text, repeated several times. In each
stanza, the letters are shaded according to the activation that it causes a particular neuron
(darker means more active). This is repeated for several neurons.
## References
The source text is The Complete Project Gutenberg Works of Jane Austen:
http://www.gutenberg.org/files/31100/31100.txt
For more on convolutional autoencoders in Keras, see:
https://blog.keras.io/building-autoencoders-in-keras.html