Deep Metric Learning using Similarities from Nonlinear Rank Approximations