-
I'm attempting to solve the traveling salesman problem using the standard GCN implementation (I have read some papers on message passing networks so I wanted to try this) by training against tour lengths of the optimal. I'm generating my training data, much of which will have 0's in for certain labels because these actions - cities to visit - are unselectable due to the current tour selection. For example, in a 10 node configuration, I might have an optimal tour (computed by [num, num, num, num, num, num, num, num, num, num] # first label because all cities can be selected from
[0, num, num, num, num, num, num, num, num, num]
[0, 0, num, num, num, num, num, num, num, num]
[0, 0, 0, num, num, num, num, num, num, num]
[0, 0, 0, 0, num, num, num, num, num, num]
[0, 0, 0, 0, 0, num, num, num, num, num]
[0, 0, 0, 0, 0, 0, num, num, num, num]
[0, 0, 0, 0, 0, 0, 0, num, num, num]
[0, 0, 0, 0, 0, 0, 0, 0, num, num]
[0, 0, 0, 0, 0, 0, 0, 0, 0, num] The question ends up becoming: if I have a model = GCN(n_labels=dataset.n_labels, output_activation='linear', dropout_rate=0.1, channels=64)
model.compile(
optimizer=Adam(1e-3),
loss=MSE,
)
cutoff = int(dataset.n_graphs*.8)
# Important to set node_level to true for multiple graphs
loader_tr = DisjointLoader(dataset[:cutoff], node_level=True)
loader_va = DisjointLoader(dataset[cutoff:], node_level=True) What is the best way to manage this intentionally "missing" data and correlate it with the node attributes that will ultimately have a notation that this index is Just curious about how to leverage node attributes properly in a non-linear node prediction problem. Maybe a different activation kernel? Open to any suggestions and can post more information if not enough! Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'm thinking that the reason I'm seeing strange behavior is because of the |
Beta Was this translation helpful? Give feedback.
-
I realized that the real issue was that I was using complete graphs paired with a GCN. I retrained using incomplete graphs generated by networkx and used the |
Beta Was this translation helpful? Give feedback.
I realized that the real issue was that I was using complete graphs paired with a GCN. I retrained using incomplete graphs generated by networkx and used the
GeneralGNN
instead. This turned into much more reproducible results as I had read in literature.