encoder-agnostic-adaptation
encoder-agnostic-adaptation copied to clipboard
Fix the gold index issue in fetching logprob
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:]