Skip to main content

TensorFlow-compatible Transformer layers and models.

Reason this release was yanked:

I uploaded a newer release

Project description

# maximal

Current version: 0.3.0 (Beta)

A TensorFlow-compatible Python library that provides models and layers to implement custom Transformer neural networks.

Built on TensorFlow 2.

<br>

# Installation Its installation is straightforward:

` pip install maximal `

<br>

# How to use it? maximal is commonly called as:

` import maximal as max `

<br>

# Documentation An official [documentation website] with explanations and tutorials is on the way.

<br>

# Elements

In layers.py: - SelfAttention: keras.Layer, computes Scaled Dot-Product Attention.

  • MultiHeadSelfAttention: keras.Layer, it is a concatenation of SelfAttention layers, resized back to original input shape through linear transformation.

  • PositionalEmbedding: keras.Layer, implements double Embedding layers used in Transformers literature, for tokens and positions. Positional encoding is learned through a tf.keras.layers.Embedding() layer, instead of deterministic positional encoding in the original paper.

  • TransformerLayer: keras.Layer single Transformer Encoder piece. It can be used inside any Sequential() model in Keras.

In schedules.py: - OriginalTransformerSchedule: keras.Layer implements the learning rate schedule of the original Transformer paper. It is taken from this [official TensorFlow tutorial](https://www.tensorflow.org/text/tutorials/transformer).

<br>

# Requirements ` numpy tensorflow >= 2.0 `

<br>

# Author Ivan Bongiorni. [LinkedIn](https://www.linkedin.com/in/ivan-bongiorni-b8a583164/)

<br>

# License 2020 Ivan Bongiorni

This repository is licensed under the MIT license. See [LICENCE.txt]() for further details.

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

maximal-0.3.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file maximal-0.3.tar.gz.

File metadata

  • Download URL: maximal-0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.45.0 importlib-metadata/4.8.3 keyring/21.2.0 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9

File hashes

Hashes for maximal-0.3.tar.gz
Algorithm Hash digest
SHA256 2a52ce95ad98eb0197d7988b3c503ba0cf35dd9569e09773a04b043c112636a3
MD5 1414b333e37b7817b1dba25fcaea853f
BLAKE2b-256 318b3a55ba1ab8000b7d446999a4267f6e66af85d1efc7edb4560d4eab281120

See more details on using hashes here.

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