Closed Dreamupers closed 3 years ago
Good observation! Sloving numerical ranges problem could probably improve the model further. To faily compare with other method, we did not change the loss as used in GreedyHash. I agree that the different numerical ranges could be a problem.
Thank you for your quick reply. I have also noticed that in greedyhash. I will try this small correction and compare the performance of the model. Thank you again!
The last layer before quantization is a fully connected layer without ReLU. The numerical range of the output is -inf to +inf.
The images features are extracted by vgg16 networks which are activated by ReLu, and the range is 0 to +inf. So, the cosine similarity between features is from 0 to 1. However, the hash codes are +1 or -1 which cosine similarity is from -1 to 1. The loss function is mseloss written as : /ImageHashing/Flickr25k.py:101
I’m not sure if there is a problem here, because the numerical ranges of the
target_b
andtarget_x
are not the same.