Feed forward layer implemented in Keras
Project description
Keras Position-Wise Feed Forward
Implementation of position-wise feed forward layer in the paper: Attention is All You Need
Install
pip install keras-position-wise-feed-forward
Usage
from tensorflow import keras
from keras_position_wise_feed_forward import FeedForward
input_layer = keras.layers.Input(shape=(None, 32))
feed_forward_layer = FeedForward(units=128)(input_layer)
model = keras.models.Model(inputs=input_layer, outputs=feed_forward_layer)
model.compile(optimizer='adam', loss='mse')
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-position-wise-feed-forward-0.8.0.tar.gz
.
File metadata
- Download URL: keras-position-wise-feed-forward-0.8.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
987080173dd5f4a27819e0d10598e01ee2f1973b143508773045931348c470a2
|
|
MD5 |
a6b373fc1ad1fbb7e9cefb846622d087
|
|
BLAKE2b-256 |
57e7309d76671f5a7c8c9bae0d516dced34fd6ba50bc417aed6a940565d4b6aa
|