Describir: Deep learning to ternary hash codes by continuation