Kyubyong / transformer

A TensorFlow Implementation of the Transformer: Attention Is All You Need
Apache License 2.0
4.28k stars 1.3k forks source link

for _ in tqdm(range(self.hp.maxlen2)) #142

Open tyongguang opened 5 years ago

tyongguang commented 5 years ago

In eval function, is it better to use “tf.while_loop”for this loop?

gaoxuezhao commented 5 years ago

I don't understand the conditional sentence in the loop, it always false。

if tf.reduce_sum(y_hat, 1) == self.token2idx[""]: break