bxshi/ProjE

Tensorflow version

trishav96 opened this issue · 28 comments

Hi,

Which version of tensorflow and python is used in the project?

Thanks.

bxshi commented

Hi I think it is Python3 and an older version of TensorFlow maybe 1.3.

Okay. And the command can be this?
./ProjE_softmax.py --dim 5 --batch 5 --data ./data/FB15k/ --eval_per 1 --worker 5 --eval_batch 5 --max_iter 5 --generator 5?

bxshi commented

This should be fine.

bxshi commented

You could start with the command I shared in the README, that should work.

It takes too long, so I thought I'll give smaller values. How many CPU cores are ideally needed? And do I need a GPU?

bxshi commented

You don't need a GPU -- I ran this code on a 48 core machine. If you don't have that many cores, you can reduce the number of generators because each of them is a thread. I would suggest you enlarge batch size set max_iter to 1, and reduce generator to 1.

Which version of numpy do I use?

bxshi commented

Sorry, I don't recall. Something released before 2017 would be fine.

What is final output of ProjE_softmax.py supposded to be? Given input is a knowledge graph (FB15k).

bxshi commented

Its just the HITS and MR scores printed on the screen.

What about the completed knowledge graph?

bxshi commented

But the paper title is knowledge graph completion right?

Hi, could you tell me which lines have the variables that store the embeddings of the entities in the Proje_softmax.py file?

bxshi commented

Are they tensorflow variables or normal variables?

self.__ent_embedding = tf.get_variable("ent_embedding", [self.__n_entity, embed_dim],
initializer=tf.random_uniform_initializer(minval=-bound,
maxval=bound,
seed=345))

Is it this? (Line 187)

bxshi commented

How to I read this?
When I do print(self.__ent_embedding) it print this -->
<tf.Variable 'ent_embedding:0' shape=(14951, 1) dtype=float32_ref>
Tensor("ProjE_1/TopKV2_1:1", shape=(?, 14951), dtype=int32, device=/device:CPU:*)

bxshi commented

I've tried doing it. It didn't work. Do you have a link I can follow to do it? Please provide it? It'll be really helpful.

bxshi commented

Okay, I'll try searching it. Thanks.

Hi,

So I ran the code for a smaller dataset and on 8 cores with 20GB RAM. 1 generator and 2 workers. But the code doesn't end at all. It shows evaluation metrics for last iteration and is just hung there. Am I missing anything?

bxshi commented

It may just take a very long time to finish I guess. I never experienced such a thing before.

/ProjE_softmax.py --dim 200 --batch 200 --data ./data/FB15k/ --eval_per 10 --worker 3 --eval_batch 500 --max_iter 10 --generator 1

This is the query I ran, I modified eval_per to 10 and max_iter to 10.

How long would it take? The dataset has ~2.5k triples.