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
Close
Hashes for keras-position-wise-feed-forward-0.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 987080173dd5f4a27819e0d10598e01ee2f1973b143508773045931348c470a2 |
|
MD5 | a6b373fc1ad1fbb7e9cefb846622d087 |
|
BLAKE2b-256 | 57e7309d76671f5a7c8c9bae0d516dced34fd6ba50bc417aed6a940565d4b6aa |