Giter VIP home page Giter VIP logo

Comments (4)

ZichaoHuang avatar ZichaoHuang commented on June 1, 2024

这一行会把top_k所得到的结果倒序,实际上是找了距离最小的10个idx。

from transe.

sjtuxcx avatar sjtuxcx commented on June 1, 2024

不好意思,我还是没搞明白,(挠头)这一行指的是_, idx_tail_prediction = tf.nn.top_k(tf.reduce_sum(tf.abs(distance_tail_prediction), axis=1),k=self.kg.n_entity)吗,如果倒序的话不应该是在abs或者reduce_sum操作后加一个负号吗

from transe.

ZichaoHuang avatar ZichaoHuang commented on June 1, 2024

"这一行“指的是model.py第235行,其中的idx_head_prediction[::-1]tf.nn.top_k()所得到的结果进行了倒序,所以实际上是查找了距离最小的10个idx。

from transe.

sjtuxcx avatar sjtuxcx commented on June 1, 2024

哦哦,你的k取了entity的数量,明白了,谢谢!

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.