Training strategies for efficient deep image retrieval