jiangqy / DCMH-CVPR2017

source code for paper "Deep Cross-Modal Hashing"
99 stars 39 forks source link

magic of data sampling #13

Closed iTomxy closed 3 years ago

iTomxy commented 4 years ago

I found that the model fails to re-produce the results when using the commented-out sampling strategy in Ln 37 and Ln 41 in DCMH_demo.py, i.e., sampling WITHOUT replacement, even if I shuffle the index before each training epochs. And it works well with Ln 39 ~ 40, i.e., sampling WITH replacement. But why ?

jiangqy commented 3 years ago

The expectations of the gradient are the same for these two settings.