Sujit-O / pykg2vec

Python library for knowledge graph embedding and representation learning.
MIT License
602 stars 109 forks source link

Model proje_pointwise crashes when using cuda #180

Closed ArkDu closed 3 years ago

ArkDu commented 3 years ago

When I tried train.py in examples and chose model proje_pointwise (with -exp true), the project crashed when I select GPU. Also, the model trains really slow (around 16 minutes per epoch.)

Screen Shot 2020-09-14 at 11 07 51 AM
baxtree commented 3 years ago

Hi, @ArkDu, could you try this PR https://github.com/Sujit-O/pykg2vec/pull/182 ?

ideafang commented 3 years ago

Hi, @baxtree , thanks for your code, the project run well in GPU mode when I update your changes. However, it still run slower than other models. It has only 5.25it/s in Proje_pointwise and almost 8 minutes per epoch.

baxtree commented 3 years ago

Oh interesting... @xiaofangdyd, Is this slowness specific to proje_pointwise, or to any other models as well? Smells like a separate issue to me and non-functional given this one is about training crashing.

ideafang commented 3 years ago

@baxtree ,I also run TransE model in fb15k database, the project run very fast about 69.78it/s and less than one minute per epoch. So I think it may be a specific to proje_pointwise.

ArkDu commented 3 years ago

@baxtree I think the crashing problem is solved in PR. However, I agree with @xiaofangdyd that the proje_pointwise runs obviously slower than other models. This is true for both running with CPU and GPU. I'm assuming that the model is slower than others by design.