Open repoloper opened 6 years ago
Refer to #1334
t2t-decoder \
--data_dir=$DATA_DIR \
--problem=$PROBLEM \
--model=$MODEL \
--hparams_set=$HPARAMS \
--output_dir=$TRAIN_DIR \
--decode_hparams="beam_size=$BEAM_SIZE,alpha=$ALPHA,return_beams=True" \
--t2t_usr_dir=$USR_DIR
return_beams=True
is important to get the alternatives.
beam_size is the number of examples you want to get.
Description
In the transformer-translation task, is there a way to get multiple alternate translations?
I've been trying to get multiple translations for an input sentence. I have set the
num_decodes
variable to 5 to no effect. I am using decode-from-dataset. The command I am using is along the lines of:I see that it is being used in the code here, but I don't understand if decode_once means that there's only one output coming out of the decoder even if there is a loop.
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/decoding.py#L173
Can provide more information as needed. ...
Environment information