ryankiros / visual-semantic-embedding

Implementation of the image-sentence embedding method described in "Unifying Visual-Semantic Embeddings with Multimodal Neural Language Models"
Other
426 stars 126 forks source link

vectorized computation of contrastive loss #1

Closed ivendrov closed 9 years ago

ivendrov commented 9 years ago

Almost doubles the speed of training, no significant impact on results (checked for Flickr8k and Flickr30k).

Semantically, the only difference is that all possible contrastive pairs within a minibatch are used, where before it was ncon pairs, with default ncon = 100.