Open fangleai opened 4 years ago
In story generation task, the original code fetches incorrect index of "logprob", leading to incorrect perplexity evaluation.
Originally: tgt_in = tgt[:-1] log_probs, attn = ... ... gold = tgt_in
Edited: tgt_in = tgt[:-1] log_probs, attn = ... ... gold = tgt[1:]
In story generation task, the original code fetches incorrect index of "logprob", leading to incorrect perplexity evaluation.
Originally: tgt_in = tgt[:-1] log_probs, attn = ... ... gold = tgt_in
Edited: tgt_in = tgt[:-1] log_probs, attn = ... ... gold = tgt[1:]