You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm interested in your research, but I have some questions about vector normalization in Train_TransE.cpp.
Paper "Translating Embeddings for Modeling Multi-relational Data" says:
The optimization is carried out by stochastic gradient descent (in minibatch mode), over the possible
h, and t, with the additional constraints that the L2-norm of the embeddings of the entities is 1 (no regularization or norm constraints are given to the label embeddings ). This constraint is important for our model, as it is for previous embedding-based methods, because it prevents the training process to trivially minimize L by artificially increasing entity embeddings norms.
But I'm confused about two places in Train_TransE.cpp:
1:
Here is the normalization function in Train_TransE.cpp: double norm(vector<double> &a) { double x = vec_len(a); if (x>1) for (int ii=0; ii<a.size(); ii++) a[ii]/=x; return 0; }
It seems that you will not normalize vectors whose length is smaller than 1.
2:
Relation vectors are normalized.
Can you give some hints to help me understand your algorithm?
The text was updated successfully, but these errors were encountered:
Hi,
I'm interested in your research, but I have some questions about vector normalization in Train_TransE.cpp.
Paper "Translating Embeddings for Modeling Multi-relational Data" says:
But I'm confused about two places in Train_TransE.cpp:
1:
Here is the normalization function in Train_TransE.cpp:
double norm(vector<double> &a) { double x = vec_len(a); if (x>1) for (int ii=0; ii<a.size(); ii++) a[ii]/=x; return 0; }
It seems that you will not normalize vectors whose length is smaller than 1.
2:
Relation vectors are normalized.
Can you give some hints to help me understand your algorithm?
The text was updated successfully, but these errors were encountered: