Skip to main content

Feed forward layer implemented in Keras

Project description

Keras Position-Wise Feed Forward

Version License

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

keras-position-wise-feed-forward-0.8.0.tar.gz (4.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page