Comments (7)
According to the original paper of TransE, normalizing the embeddings is part of the training procedure.
See line 5 of Algorithm 1 in the TransE paper.
from transe.
Thanks a lot for your answering! But my confusion is: which line of the code conducts this normalization? I only see the normalization in the very beginning (line 51&52 in model.py), how do the norm of embeddings remain unchanged during training?
from transe.
Actually, the normalization scope would do the trick.
Since the the embeddings are results of the l2_normalize
op in the defined computation graph, they will be firstly normalized when they are acquired for a forward step during training.
from transe.
Thanks for your valuable answer! I think I've got it. Thanks again.
from transe.
You're welcome.
from transe.
The relation embeddings don't need to be normalized per loop according to the original paper, Why do you normalize it per loop in your code?
from transe.
@ZhCoding I find that the normalization of the relation embeddings results in slightly better performance so I keep this tiny modification.
from transe.
Related Issues (20)
- run problem HOT 2
- thanks HOT 1
- 一点小问题 HOT 4
- 请问能给出输入数据的形式吗? HOT 1
- 请教prediction HOT 4
- multiprocessing里面的joinablequeue卡住 HOT 5
- embedding结果与entity、relation是如何对应的 HOT 4
- Evaluate rank seems wrong HOT 2
- The result is too good to make me feel confused HOT 2
- a question about hit@1 HOT 2
- 是否存在内存泄露的问题?在每次eval时内存会增加 HOT 7
- 请问一下模型训练好以后要如何进行predict呢? HOT 1
- could you please support some data link to download in your code, thx HOT 1
- 问题 HOT 3
- rank of head entity in tail prediction HOT 4
- 嵌入数据的导出 HOT 1
- Compute Head and Tail Prediction on FB15K dataset HOT 1
- Format of Input Dataset HOT 2
- 您好,我用了您的代码跑我自己的数据集,为什么我的头实体预测的hit10很低,关系预测结果正常,请问是什么原因? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transe.