Template Matching Deep Learning