Graph Construction
Opened this issue · 1 comments
pazadimo commented
Hi @Richarizardd,
Thanks for sharing the code. I have a question regarding graph construction in latent space:
I was wondering why do you pass coords to the query function for latent graph generation as:
model.fit(features)
a = np.repeat(range(num_patches), radius-1)
b = np.fromiter(chain(*[model.query(coords[v_idx], topn=radius)[1:] for v_idx in range(num_patches)]),dtype=int)
edge_latent = torch.Tensor(np.stack([a,b])).type(torch.LongTensor)
I wonder if it is the way that DGC model requires for the graph to be constructed?
Thanks
Vison307 commented
I encountered with the same problem. I guess it is bug because once I print our the result of [model.query(coords[v_idx], topn=radius)[1:] for v_idx in range(num_patches)]
, I find all the queried indexes are the same. (Though I have no idea why the code can be executed successfully as coords and features are in different shapes).
After I change coords
to features
, the results seem to be normal.