Enhancing Convolutional Neural Network for Image Retrieval