All Projects → Lsdefine → Attention Is All You Need Keras

Lsdefine / Attention Is All You Need Keras

A Keras+TensorFlow Implementation of the Transformer: Attention Is All You Need

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Attention Is All You Need Keras

Dinoruntutorial
Accompanying code for Paperspace tutorial "Build an AI to play Dino Run"
Stars: ✭ 285 (-54.62%)
Mutual labels:  keras-tensorflow
Invoice
增值税发票OCR识别,使用flask微服务架构,识别type:增值税电子普通发票,增值税普通发票,增值税专用发票;识别字段为:发票代码、发票号码、开票日期、校验码、税后金额等
Stars: ✭ 381 (-39.33%)
Mutual labels:  keras-tensorflow
Music recommender
Music recommender using deep learning with Keras and TensorFlow
Stars: ✭ 528 (-15.92%)
Mutual labels:  keras-tensorflow
Dab
Data Augmentation by Backtranslation (DAB) ヽ( •_-)ᕗ
Stars: ✭ 294 (-53.18%)
Mutual labels:  attention-is-all-you-need
Transformer
A TensorFlow Implementation of the Transformer: Attention Is All You Need
Stars: ✭ 3,646 (+480.57%)
Mutual labels:  attention-is-all-you-need
Srnn
sliced-rnn
Stars: ✭ 462 (-26.43%)
Mutual labels:  keras-tensorflow
Resnetcam Keras
Keras implementation of a ResNet-CAM model
Stars: ✭ 269 (-57.17%)
Mutual labels:  keras-tensorflow
Attention Is All You Need Pytorch
A PyTorch implementation of the Transformer model in "Attention is All You Need".
Stars: ✭ 6,070 (+866.56%)
Mutual labels:  attention-is-all-you-need
Predictive Maintenance Using Lstm
Example of Multiple Multivariate Time Series Prediction with LSTM Recurrent Neural Networks in Python with Keras.
Stars: ✭ 352 (-43.95%)
Mutual labels:  keras-tensorflow
Labml
🔎 Monitor deep learning model training and hardware usage from your mobile phone 📱
Stars: ✭ 508 (-19.11%)
Mutual labels:  keras-tensorflow
Amazing Semantic Segmentation
Amazing Semantic Segmentation on Tensorflow && Keras (include FCN, UNet, SegNet, PSPNet, PAN, RefineNet, DeepLabV3, DeepLabV3+, DenseASPP, BiSegNet)
Stars: ✭ 309 (-50.8%)
Mutual labels:  keras-tensorflow
Deepcut
A Thai word tokenization library using Deep Neural Network
Stars: ✭ 330 (-47.45%)
Mutual labels:  keras-tensorflow
Introneuralnetworks
Introducing neural networks to predict stock prices
Stars: ✭ 486 (-22.61%)
Mutual labels:  keras-tensorflow
Segmentation models
Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
Stars: ✭ 3,575 (+469.27%)
Mutual labels:  keras-tensorflow
Textclassificationbenchmark
A Benchmark of Text Classification in PyTorch
Stars: ✭ 534 (-14.97%)
Mutual labels:  attention-is-all-you-need
Transformer
A Pytorch Implementation of "Attention is All You Need" and "Weighted Transformer Network for Machine Translation"
Stars: ✭ 271 (-56.85%)
Mutual labels:  attention-is-all-you-need
Pytorch Original Transformer
My implementation of the original transformer model (Vaswani et al.). I've additionally included the playground.py file for visualizing otherwise seemingly hard concepts. Currently included IWSLT pretrained models.
Stars: ✭ 411 (-34.55%)
Mutual labels:  attention-is-all-you-need
Awesome Fast Attention
list of efficient attention modules
Stars: ✭ 627 (-0.16%)
Mutual labels:  attention-is-all-you-need
Speech Transformer
A PyTorch implementation of Speech Transformer, an End-to-End ASR with Transformer network on Mandarin Chinese.
Stars: ✭ 565 (-10.03%)
Mutual labels:  attention-is-all-you-need
Nmt Keras
Neural Machine Translation with Keras
Stars: ✭ 501 (-20.22%)
Mutual labels:  attention-is-all-you-need

The Transformer model in Attention is all you need:a Keras implementation.

A Keras+TensorFlow Implementation of the Transformer: "Attention is All You Need" (Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin, arxiv, 2017)

Usage

Please refer to en2de_main.py and pinyin_main.py

en2de_main.py

Results

  • The code achieves near results as in the repository: about 70% valid accuracy. If using smaller model parameters, such as layers=2 and d_model=256, the valid accuracy is better since the task is quite small.

For your own data

  • Just preproess your source and target sequences as the format in en2de.s2s.txt and pinyin.corpus.examples.txt.

Some notes

  • For larger number of layers, the special learning rate scheduler reported in the papar is necessary.
  • In pinyin_main.py, I tried another method to train the deep network. I train the first layer and the embedding layer first, then train a 2-layers model, and then train a 3-layers, etc. It works in this task.

Upgrades

  • Reconstruct some classes.
  • It is more easier to use the components in other models, just import transformer.py
  • A fast step-by-step decoder is added, including an upgraded beam-search. But they should be modified to be reuseable.

Acknowledgement

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].