While this may not have much impact for numpy based calculations, any autodiff implementation would benefit greatly (in terms of numerical stability) from allowing users to feed log_weights directly instead of weights. This is particularly valid for a few reasons:
- Most packages out there prefer outputting logpdf for random variables
- Most techniques (bregman projections, smooth ot at least) can (should?) be written purely in the logspace without much work for numerical speed and stability
While this may not have much impact for numpy based calculations, any autodiff implementation would benefit greatly (in terms of numerical stability) from allowing users to feed log_weights directly instead of weights. This is particularly valid for a few reasons: