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

what is the element of model.reconstructions in model.py? #41

Open
yjyGo opened this issue Jul 4, 2019 · 3 comments
Open

what is the element of model.reconstructions in model.py? #41

yjyGo opened this issue Jul 4, 2019 · 3 comments

Comments

@yjyGo
Copy link

yjyGo commented Jul 4, 2019

Sorry, but I can't understand at the line 114 in file model.py, what's the element of self.reconstruction? probability value? But when I run the program, I print the variable reconstructions, and get the result:
reconstruction [ 2.3758938 -0.10602921 0.103589 ... 0.8698976 3.3979175
3.6787224 ]

@tkipf
Copy link
Owner

tkipf commented Jul 4, 2019 via email

@MinhAnhL
Copy link

I'm currently trying to use GAE to do graph representation learning, thus I need to extract node features with dimension nxd, with n number of nodes and d number of features.
Or so-called embeddings Z according to Kipf https://arxiv.org/pdf/1611.07308.pdf

As far, as I can see, the node features would be in model.reconstructions
(@tkipf could you maybe confirm?).

However, I'm not able to get a vector of values like your example (@yjyGo).
I can see shape and datatype (on the Cora example)

Tensor("gcnmodelae/innerproductdecoder_1/Reshape:0", shape=(?,), dtype=float32)

Would you mind sharing your code chunk?

@MinhAnhL
Copy link

@yjyGo got it:
the embeddings can be extracted with

output = sess.run(model.z_mean, feed_dict=feed_dict)

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

3 participants