when i train transformer with opennmt-py. i found it often lost words when the sentences is long. even the src-train.txt and the tgt-train is same. some eg. when translate
input: Delivered to over 250,000 civil rights supporters from the steps of the Lincoln Memorial in Washington, D.C., the speech was a defining moment of the civil rights movement and among the most iconic speeches
output: Delivered to over 250,000 civil rights supporters from the steps of the Lincoln Memorial
i wonder if i miss something important in preprocess or train parameters?
preprocess
onmt_preprocess -train_src data-10best/src-train.txt -train_tgt data-10best/tgt-train.txt -valid_src data-10best/src-val.txt -valid_tgt data-10best/tgt-val.txt -save_data data-10best/demo
train command
python train.py -data data-10best/demo -save_model 10best-model
-layers 6 -rnn_size 512 -word_vec_size 512 -transformer_ff 2048 -heads 8
-encoder_type transformer -decoder_type transformer -position_encoding
-train_steps 20000 -max_generator_batches 2 -dropout 0.1
-batch_size 1024 -batch_type tokens -normalization tokens -accum_count 2
-optim adam -adam_beta2 0.998 -decay_method noam -warmup_steps 2000 -learning_rate 1
-max_grad_norm 0 -param_init 0 -param_init_glorot
-label_smoothing 0.1 -valid_steps 2500 -save_checkpoint_steps 5000
-world_size 4 -gpu_ranks 0 1 2 3 -log_file log.10best.txt
translate command
onmt_translate -gpu 0 -model 10best-model_step_20000.pt 10best-model_step_15000.pt 10best-model_step_10000.pt 10best-model_step_5000.pt -src rec-base/rec.short.transformer -output rec-10best/rec.short -replace_unk