On Bayesian learning via loss functions