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
EncodeProcessDecode model documentation #15
Comments
The Internally, this module first encode the graph with fixed size feature (defined in |
Thank you! Just to clarify: |
If you specify |
got it now, thank you for your time! |
I was wondering what would happen if nodes vary in their feature sizes. I assume under current code conditions they all have to be padded to have the same size? |
The short answer is yes, since the graph network treats all nodes equally (except for the actual values of their features), so the MLPs (or other models) that process nodes and edges, have to assume a fixed size. However, you should think carefully about how you do the padding. For examples: lets say you have nodes of two types, with a set of shared features (x_i), but some some features that are specific to each node type (y_i, and z_i): In this case you would probably do the padding as: so the shared features are aligned and the non-shared features have their own slots. Additionally, you may want to include a one hot encoding of the type of nodes to help the network reason about the different node types, so the final features would look like: In this case you would probably do the padding as: In some cases, if you have many node types, and each of them have their own different features, you may not be able to afford having different slots for the different features. In these cases it should be good enough to just pad with zeros at the end, and let the network use the one-hot encodings to do the reasoning. |
That helped. Appreciate the response! |
Hi,
I've been trying to understand the EncodeProcessDecode model parameters, however, the documentation is a little scarce on the parameters (edge_output_size, node_output_size, global_output_size) in this case.
In the code I found the following comment
# Transforms the outputs into the appropriate shapes.
but that doesn't clarify the exact reshaping. Can anybody clarify?Thanks a lot!
The text was updated successfully, but these errors were encountered: