transformer
transformer copied to clipboard
When terminate a inference, the dimensions doesn't match.
https://github.com/Kyubyong/transformer/blob/2234b4268355ccc073d8f0535fdd395289001151/model.py#L168
I know this line is used to end a inference, but y_hat.shape=[N, ?], and tf.reduce_sum(y_hat, 1) get a shape=[N], how to compare with self.token2idx["<pad>"]
(a int value)?
Please tell me if i'm wrong. @Kyubyong
@Kyubyong I just ran two experiments, experiment 1 comments this line and the other one doesn't, and i find two results are equal completely. So, i think this code is not be used. Please check it.