Maximum-likelihood dissimilarities in image recognition with deep neural networks