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

Add multiple node features in networkx graph #14

Closed
ferreirafabio opened this issue Nov 4, 2018 · 2 comments
Closed

Add multiple node features in networkx graph #14

ferreirafabio opened this issue Nov 4, 2018 · 2 comments

Comments

@ferreirafabio
Copy link

Is it possible to add multiple features to a single node to a networkx graph and then pass the graph to the graph net function utils_np.networkx_to_data_dict()?

In the documentation this case is not explicitly stated:
https://github.com/deepmind/graph_nets/blob/master/docs/graph_nets.md#utils_npnetworkx_to_data_dictgraph_nx-node_shape_hintnone-edge_shape_hintnone-data_type_hintfloat32

Thank you

@vbapst
Copy link

vbapst commented Nov 4, 2018

Hello,

no, this is not currently supported, as utils_np.networkx_to_data_dict will only pull the features contained under the key "features". Moreover the remaining of the graph net library (e.g. the modules) assumes that the node features are single tensors.

You could create several graphs and then concatenate them down the line if that helps.

@ferreirafabio
Copy link
Author

thank you

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