SoDeep: a Sorting Deep net to learn ranking loss surrogates