On the Connection Between the Human Visual System and Machine Learning: Exploiting Perceptual Distances in Neural Networks