Reputation: 41
In Tensorflow seq2seq how can I calculate the probability of generation of a certain output sequence, given the seq2seq model and an input sequence?
Upvotes: 4
Views: 546
Reputation: 11
You must be have read this paper. Sequence to Sequence Learning with Neural Networks. There is a math equation, But in the Tensorflow seq2seq, logits is score of words. And you can get the probability of words by softmax. You can define a softmax function like this, softmax = lambda logits: np.exp(logits) / np.sum(np.exp(logiys), axis=0). Next you can calculate the probability of output. I've been thinking of doing that lately. If you have some good suggestion, please exchange with me, thanks a lot!
Upvotes: 1