This function is combined with an auto-regressive decoder, where the decoder chooses the DB constant that is most similar to the words it is currently attending to.
selecting DB constants is done one at a time rather than as a set, and informative global considerations are ignored.