-
I'm currently working with a graph model that involves heterogeneous graphs and node classification for a specific node type. I haven't been able to find any examples or documentation on how to perform inference on this type of model after it has been trained. During the inference process, new nodes of various types are introduced, and I'm particularly interested in understanding how to utilize the Neighborhood Loader in this context. I would greatly appreciate any guidance or resources that can help me understand how to conduct inference on a trained graph model, especially when dealing with the addition of new nodes during inference time. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
In general, GNNs are inductive, so there is not a problem with applying a trained graph model on unseen graphs or nodes. In the PyG case, you can just apply your out = model(new_data.x, new_data.edge_index) If you want to leverage the loader = NeighborLoader(new_data, input_nodes=new_node_ids, ...)
... Let me know if this answers your question. |
Beta Was this translation helpful? Give feedback.
Yes, you would just run your GNN on the subgraph you are interested about, the question is how to obtain this subgraph (e.g., via
NeighborLoader
,k_hop_subgraph
or something else).