Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow version #11

Open
trishav96 opened this issue Apr 8, 2019 · 28 comments
Open

Tensorflow version #11

trishav96 opened this issue Apr 8, 2019 · 28 comments

Comments

@trishav96
Copy link

Hi,

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

Thanks.

@bxshi
Copy link
Owner

bxshi commented Apr 9, 2019

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

@trishav96
Copy link
Author

trishav96 commented Apr 9, 2019

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
Copy link
Owner

bxshi commented Apr 9, 2019

This should be fine.

@bxshi
Copy link
Owner

bxshi commented Apr 9, 2019

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

@trishav96
Copy link
Author

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
Copy link
Owner

bxshi commented Apr 9, 2019

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.

@trishav96
Copy link
Author

Which version of numpy do I use?

@bxshi
Copy link
Owner

bxshi commented Apr 9, 2019

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

@trishav96
Copy link
Author

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

@bxshi
Copy link
Owner

bxshi commented Apr 10, 2019

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

@trishav96
Copy link
Author

What about the completed knowledge graph?

@bxshi
Copy link
Owner

bxshi commented Apr 10, 2019 via email

@trishav96
Copy link
Author

But the paper title is knowledge graph completion right?

@trishav96
Copy link
Author

trishav96 commented Apr 10, 2019 via email

@trishav96
Copy link
Author

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

@bxshi
Copy link
Owner

bxshi commented Apr 12, 2019 via email

@trishav96
Copy link
Author

Are they tensorflow variables or normal variables?

@trishav96
Copy link
Author

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
Copy link
Owner

bxshi commented Apr 12, 2019 via email

@trishav96
Copy link
Author

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
Copy link
Owner

bxshi commented Apr 12, 2019 via email

@trishav96
Copy link
Author

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
Copy link
Owner

bxshi commented Apr 12, 2019 via email

@trishav96
Copy link
Author

Okay, I'll try searching it. Thanks.

@trishav96
Copy link
Author

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
Copy link
Owner

bxshi commented Apr 14, 2019

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

@trishav96
Copy link
Author

/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.

@trishav96
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants