tensorflow / nmt

TensorFlow Neural Machine Translation Tutorial
Apache License 2.0
6.35k stars 1.96k forks source link

isn't it using wrong factor? in iterator_utils.py? #444

Closed myunggiM closed 5 years ago

myunggiM commented 5 years ago

isn't it using wrong factor? in iterator_utils.py? in line 168~173

Create a tgt_input prefixed with and a tgt_output suffixed with .

src_tgt_dataset = src_tgt_dataset.map( lambda src, tgt: (src, tf.concat(([tgt_sos_id], tgt), 0), tf.concat((tgt, [tgt_eos_id]), 0)), num_parallel_calls=num_parallel_calls).prefetch(output_buffer_size)

input lambda factor is 2 but number of output is 3
therefore i think it( src,tgt ) is edited like src, tgt_in , tgt_out

so it'll be src_tgt_dataset = src_tgt_dataset.map( lambda src, tgt_in , tgt_out: (src, tf.concat(([tgt_sos_id], tgt), 0), tf.concat((tgt, [tgt_eos_id]), 0)), num_parallel_calls=num_parallel_calls).prefetch(output_buffer_size)

isn't it? plz give me feedback..