stanfordnlp / GloVe

Software in C and data files for the popular GloVe model for distributed word representations, a.k.a. word vectors or embeddings
Apache License 2.0
6.86k stars 1.51k forks source link

Fix superfluous memory usage of initialize_parameters() in glove.c #69

Closed oiwah closed 6 years ago

oiwah commented 7 years ago

The current glove.c implementation allocates superfluous memory space for word/context vectors. Vector size is already incremented for bias in line 67, therefore, we do not need to add 1 afterward.

In addition, the weird indentation is revised, too.

manning commented 6 years ago

Applied manually. Thanks, Hide.