Unofficial implementation of ON-LSTM
Project description
Keras Ordered Neurons LSTM
Unofficial implementation of ON-LSTM.
Install
pip install keras-ordered-neurons
Usage
Same as LSTM except that an extra argument chunk_size should be given:
from keras.models import Sequential
from keras.layers import Embedding, Bidirectional, Dense
from keras_ordered_neurons import ONLSTM
model = Sequential()
model.add(Embedding(input_shape=(None,), input_dim=10, output_dim=100))
model.add(Bidirectional(ONLSTM(units=50, chunk_size=5)))
model.add(Dense(units=2, activation='softmax'))
model.compile(optimizer='adam', loss='sparse_categorical_crossentropy')
model.summary()
Project details
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 keras-ordered-neurons-0.3.0.tar.gz.
File metadata
- Download URL: keras-ordered-neurons-0.3.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
beda43e4006fa50f42f846f6ed6b86fb0aad16d0b866acba5232501c57e81328
|
|
| MD5 |
063a0c6b83c0ad1a2a800102c29293ed
|
|
| BLAKE2b-256 |
815c9a31d9eed659b1cf1c38416492de50aee4fa40a438380b3443e4e081c0aa
|