Learning from Losses