Open YipingNUS opened 3 years ago
Hi,
Mathematically, the logits are just log probabilities + an additive constant (since you log_softmax the logits to get log probabilities). You could calculate log probability of top_logits first but it shouldn't change the result, since the additive constant would just be "softmaxed away" later.
@yangkevin2, really nice paper and code. I have a question regarding the calculation of the full logit in the
predict_formality.py
.Seem like you're adding the raw logit
top_logits
with thecondition_logits
which is the log probability. Why it's so? I suppose we need to calculate log probability oftop_logits
before we can add the two together.I'm still trying to understand the code and I might likely be wrong. Thanks in advance!