GithubHelp home page GithubHelp logo

Comments (7)

ZichaoHuang avatar ZichaoHuang commented on May 30, 2024

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.

zhangzhaocs avatar zhangzhaocs commented on May 30, 2024

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.

ZichaoHuang avatar ZichaoHuang commented on May 30, 2024

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.

zhangzhaocs avatar zhangzhaocs commented on May 30, 2024

Thanks for your valuable answer! I think I've got it. Thanks again.

from transe.

ZichaoHuang avatar ZichaoHuang commented on May 30, 2024

You're welcome.

from transe.

ZhCoding avatar ZhCoding commented on May 30, 2024

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.

ZichaoHuang avatar ZichaoHuang commented on May 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.