Closed longbowking closed 6 years ago
hi, you post a good question. the difference is whether you use mean average of all timestamp or use last timestamp to make a prediction; the other way is use reduce_max to make a prediction.
so you can choose the way that the best performance among these three methods.
https://github.com/brightmart/text_classification/blob/68e2fcf57a8dcec7e7d12f78953ed570451f0076/a03_TextRNN/p8_TextRNN_model.py#L67
In the implementation, the final outputs of Bi-RNN are calculated as the reduce mean among all time stamps. Compared with
output_rnn_last=output_rnn[:,-1,:]
, what is the difference between these two strategies on the impact of the final classification results?