Theoretical Investigation and Practical Application of Deep Metric Learning – A Novel Method