/transformer-en-zh

translate from English to Chinese user transformer model

Primary LanguagePythonApache License 2.0Apache-2.0

Introduction

The purpose of create this repository is to learn Transformer.

most code clone from Tensorflow-models

What I did ?

  • split vocab to inputs_vocab and targets_vocab
  • delete some tpu config
  • cut chinese to words

run demo

  1. create vocab and tfrecord
python process_data.py
  1. train_model
./en_zh_train.sh

you can change en_zh_train.sh to test and export model

There is an demo