Using deep neural networks to model similarity between visual patterns: Application to fish sexual signals