Closed Hanc1999 closed 1 year ago
Found the raised error similar to part of another issue #230
It turns out that it's my own problem with GraphTensor construction. But I will still post the reasoning since it's related to the _merge_batch_tocomponents() function and may be helpful to some others.
My original graph samples have a problem in that there will be a wrong edge that points to a non-existing node; for example, for a node set with nodes [1, ..., n], there will be a wrong edge pointing to node n+1. However, since graphs in the same batch are combined together, nodes from different GraphTensors are re-indexed, so the 'first' graph's wrong edge will point to one of the 'second' graph's nodes, while only the wrong edge of the 'last' graph will point to nowhere and raise the error in the form of 'indices[xx] = yy is not in [0, yy).'
Following the pipeline shown in input pipeline and modeling, building model for a binary classification for the heterogeneous directed graph, with gat_v2.GATv2MPNNGraphUpdate, raising errors. The following is my gnn model:
While the graph spec after preprocess model is like:
Where there are 2 node sets, operate and source, while there is always 1 'source' node in each graph, The classification model wanting to pool features from all nodes (both node sets), which is defined as:
But when training following error raises:
The error pattern always turns that indices[xx] = yy is not in [0, yy). Could anyone please have a look? Thanks.