microsoft / gated-graph-neural-network-samples

Sample Code for Gated Graph Neural Networks
MIT License
1.03k stars 264 forks source link

Please explain comments like ' # [b x v x h]' #2

Closed jenniferSun27 closed 6 years ago

jenniferSun27 commented 6 years ago

Hello, I'm reading your code and I'd like to use gnn in my work. I noticed that you added some comments like ' # [b x v x h]' in your code. I guess understanding these comments will help me understand these quickly. While I'm not sure about what these characters actually mean. Especially I can't figure out what 'b' means. Could you please explain what 'b','v','e','h' mean in chem_tensorflow_dense.py? It will help me a lot.

Thank you very much! Jennifer

mallamanis commented 6 years ago

Hi Jennifer, The comments are meant to represent the dimensionality of the tensors.

Thus, the b x v x h this means that the tensor has three dimensions: Batch size (b) is the number of graphs per batch, v is the max number of nodes/vertices per graph (in the dense implementation) and h is the size of the hidden dimension. The e stands for the number of edge types in the graph.

jenniferSun27 commented 6 years ago

Thank you for your answering. And I have another question, in the paper https://arxiv.org/abs/1511.05493 it mentioned "node annotations" distinguished from "node labels", to mark special nodes by giving them different initial node annotations. While I couldn't find corresponding parts in this code. I guess it is due to this is not necessary for your chemical molecules problem. I‘d just like to make sure if you really ignored this, or just I didn't find it.

Thanks again. Jennifer

mmjb commented 6 years ago

You are correct, we do not use this in our example application here. Our initial node labels are computed during data loading, but you could add additional information at that point, corresponding to the node annotations from our paper.

Marc

On 3 Feb 2018 1:19 pm, "jenniferSun27" notifications@github.com wrote:

Thank you for your answering. And I have another question, in the paper https://arxiv.org/abs/1511.05493 http://url it mentioned "node annotations" distinguished from "node labels", to mark special nodes by giving them different initial node annotations. While I couldn't find corresponding parts in this code. I guess it is due to this is not necessary for your chemical molecules problem. I‘d just like to make sure if you really ignored this, or just I didn't find it.

Thanks again. Jennifer

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/gated-graph-neural-network-samples/issues/2#issuecomment-362805497, or mute the thread https://github.com/notifications/unsubscribe-auth/AFU_aCwKP-wUy6ua3znF8A83dh2W7csTks5tRFzJgaJpZM4R4HQk .

jenniferSun27 commented 6 years ago

Thanks a lot.