In these three cases, the length_penalty function is decreasing when length > 0
The log_probs are all negative number, so the score is negative as well.
a negative number divided by a decreasing function...
output will alway prefer shorter sequences results...
Description
Hello , I have a question about the beam search scorer function scores = (log_probs + scores) / length_penalty length_penalty = (\frac{K + length}{K + 1})^\alpha https://github.com/dmlc/gluon-nlp/blob/0484e6494edf0a40c7bac220b5a10d8245324750/src/gluonnlp/sequence_sampler.py#L74
if K = 5, alpha = 2
if K = 5, alpha =1
if K =5, alpha = 0.5
In these three cases, the length_penalty function is decreasing when length > 0
The log_probs are all negative number, so the score is negative as well. a negative number divided by a decreasing function... output will alway prefer shorter sequences results...