Code Monkey home page Code Monkey logo

Comments (4)

EagleW avatar EagleW commented on August 23, 2024

Hi @WongIhsin, Thank you very much for your interest in our research and the suggestion. I have fixed this bug for the following commit. If you have further questions, you can also contact me using the email on my Github page. Hope you have a great day!

from paperrobot.

WongIhsin avatar WongIhsin commented on August 23, 2024

抱歉我的英文不是很好,所以还是用中文来回复了。
我觉得get_subgraph()函数中head和tail可以先head = triple[0].item(),这样可以避免included_nodes中加入tensor类型的nodes,使得adj_ingraph矩阵有多余的0行;
另外,在batch_size为200时候,included_nodes的范围大约会在10000左右,以至于adj_ingraph这个矩阵会很大,计算attention时候很容易显存溢出,并且因为shifted_pos还会进行截取,所以这里会造成很大的资源浪费。
我还阅读了https://github.com/Diego999/pyGAT的代码,发现pyGAT中的adj矩阵比较小,并不会有显存溢出的问题,并且pyGAT中的attention在更新权重的时候会都使用到。
所以我想是不是可以将shifted_pos的截取这一步移动到leakyrelu之前,可以很大程度的减少显存消耗

from paperrobot.

EagleW avatar EagleW commented on August 23, 2024

@WongIhsin 对于第一个问题我已经fix了,对第二个问题,我觉得可以把to(device)放到shifted_pos, shifted_neg = convert_index([pos, neg], batch_nodes)后应该会解决一定问题吧。还有就是batchsize可以改小一点

from paperrobot.

WongIhsin avatar WongIhsin commented on August 23, 2024

好的,非常感谢😀

from paperrobot.

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.