Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

tensor2tensor versions & t2t-decoder #598

@jh-hello

Description

@jh-hello

Hi,
Different tensor2tensor versions decode different results. is it ok ? or is there anything I missed ?

I trained a transformer_base_single_gpu model using tensorflow 1.4.1 and tensor2tensor 1.4.2
and got the result like this:
2018-01-31 06:40:12,950 STDOUT INFO:tensorflow:Inference results INPUT: Goodbye world
2018-01-31 06:40:12,950 STDOUT INFO:tensorflow:Inference results OUTPUT: Die Welt Goodbye
2018-01-31 06:40:12,950 STDOUT INFO:tensorflow:Inference results INPUT: Hello world
2018-01-31 06:40:12,951 STDOUT INFO:tensorflow:Inference results OUTPUT: Hallo
It seems good and I can reproduce the same result using tensor2tensor 1.4.2.

Using tensor2tensor (1.5.2), the same transformer_base_single_gpu model makes this result :
INFO:tensorflow:Inference results INPUT: Goodbye world
INFO:tensorflow:Inference results OUTPUT: Sch\xf6ne Welt der Welt
INFO:tensorflow:Inference results INPUT: Hello world
INFO:tensorflow:Inference results OUTPUT: nutzte Welt Welt

  • Sch\xf6ne => Schöne

Other settings and command :
export PROBLEM=translate_ende_wmt8k
export MODEL=transformer
export HPARAMS=transformer_base_single_gpu
export BEAM_SIZE=4
export ALPHA=0.6

t2t-decoder
--data_dir=$DATA_DIR
--problems=$PROBLEM
--model=$MODEL
--hparams_set=$HPARAMS
--output_dir=$TRAIN_DIR
--decode_hparams="beam_size=$BEAM_SIZE,alpha=$ALPHA"
--decode_from_file=$DECODE_FILE

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions