gae icon indicating copy to clipboard operation
gae copied to clipboard

Why I got the 0 feature data for all nodes?

Open Wangzhen-kris opened this issue 6 years ago • 4 comments

Hi, thank you again for your great work. Now I have another problem that I need your help. I process many graphs one by one. Because the value of features_nonzero is different, and I can only initialize one model, so I did the following: The embedding of each node like [0.0, 0.3024, 2.034 ... 0.0, 0.005, 0.03, 1.03], the len() is 2048, it contains many 0 value. In order to ensure features_nonzero is 2048, I replace 0 value with 1e-15, and I tried to get all node embeddings in a GAE model, but I got 0 value matrix

[[0. 0. 0. ... 0. 0. 0.]
[0. 0. 0. ... 0. 0. 0.]
[0. 0. 0. ... 0. 0. 0.]
...
[0. 0. 0. ... 0. 0. 0.]
[0. 0. 0. ... 0. 0. 0.]
[0. 0. 0. ... 0. 0. 0.]]

Why is that?If I don't, how do I process many graphs with one model? What's more, I can't do like this: 34198790-eb5bec96-e56b-11e7-90d5-157800e042de

Wangzhen-kris avatar May 28 '19 09:05 Wangzhen-kris

@tkipf Sorry, can you help me... Thank you very much!

Wangzhen-kris avatar May 30 '19 07:05 Wangzhen-kris

I recommend using a dense matrix multiplication in the first layer if you have a somewhat dense feature vector.

On Thu, May 30, 2019 at 12:38 AM Wangzhen [email protected] wrote:

@tkipf https://github.com/tkipf Sorry, can you help me... Thank you very much!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tkipf/gae/issues/36?email_source=notifications&email_token=ABYBYYHH5ZHUAH47VBBUJ2DPX576VA5CNFSM4HQBKSLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWRTXCA#issuecomment-497236872, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYBYYHKKXWHDQOWYXDEAQDPX576VANCNFSM4HQBKSLA .

tkipf avatar May 31 '19 08:05 tkipf

@tkipf So I should replace the GraphConvolutionSparse with GraphConvolution, right? What's more, if I want one step away from the central node, I can only use one time GraphConvolution in model GCNModelAE, right? If so, how to set the act, act=tf.nn.relu or act=lambda x: x? Finally, thank you again for your patience!

Wangzhen-kris avatar Jun 01 '19 12:06 Wangzhen-kris

Sounds correct to me. Simply don’t use an activation function on the last layer (as this is handled separately).

On Sat 1. Jun 2019 at 05:46 Wangzhen [email protected] wrote:

@tkipf https://github.com/tkipf So I should replace the GraphConvolutionSparse with GraphConvolution, right? What's more, if I want one step away from the central node, I can only use one time GraphConvolution in model GCNModelAE, right? If so, how to set the act, act=tf.nn.relu or act=lambda x: x? Finally, thank you again for your patience!

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/tkipf/gae/issues/36?email_source=notifications&email_token=ABYBYYBRK5BT5NZU4CAO463PYJVUFA5CNFSM4HQBKSLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWW77LI#issuecomment-497942445, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYBYYAFYO7N5WHNPT7EVRLPYJVUFANCNFSM4HQBKSLA .

tkipf avatar Jun 01 '19 16:06 tkipf