pytorch-seq2seq
pytorch-seq2seq copied to clipboard
Copy decoder in copy branch
Hi, I have seen your implement about copynet and I have a question. In your code, you directly concatenate vocab_prob with copy_prob, but there are some words , which are not oov words, in these two probability distributions. So if you return such a probability distribution, how do you calculate the NLLLoss in later step? Looking forward to your reply, thanks!
I haven't finished the implementation yet. But you will have to move the probability mass of those non-OOV words from copy_prob to vocab_prob with something similar to here
The code seems to take an in-place operation, I am not sure whether it can be backward or not.