Revert "wang2vec: normalize net before saving"
This reverts commit 1f25e787f110a11364c88e42e071d9de9d666bbf.
diff --git a/word2vecExt.c b/word2vecExt.c
index 77a2dda..b8f426a 100644
--- a/word2vecExt.c
+++ b/word2vecExt.c
@@ -492,21 +492,11 @@
}
void SaveNet() {
- long long a, b;
- float len;
-
if(type != 3 || negative <= 0) {
fprintf(stderr, "save-net only supported for type 3 with negative sampling\n");
return;
}
- for (b = 0; b < vocab_size; b++) {
- len = 0;
- for (a = 0; a < layer1_size; a++) len += syn0[a + b * layer1_size] * syn0[a + b * layer1_size];
- len = sqrt(len);
- for (a = 0; a < layer1_size; a++) syn0[a + b * layer1_size] /= len;
- }
-
FILE *fnet = fopen(save_net_file, "wb");
if (fnet == NULL) {
printf("Net parameter file not found\n");