Optimizing Non-decomposable Measures with Deep Networks