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
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.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37b6db7e6b5aebc6a7d979f4c7a98dba384d25d39aeee4893b26be8389cde13c |
|
MD5 | 57484a533818bdd62132d6d87e1eeb04 |
|
BLAKE2b-256 | e359f0faa1037c033059e7e9e7758e6c23b4d1c0772cd48de14c4b6fd4033ad5 |