When I try to use the NodeCollator method to generate a small batch of subgraphs, the number of num_dst_nodes in the generated subgraph is less than the number of train_mask I input

tmg = mgs[0] #tmg tmg is the isomorphic information transfer graph I generated before
train_mask #tensor generated from tmg’s oringin graph g size = 2987
sampler = dgl.dataloading.MultiLayerFullNeighborSampler(1)
tcollator = NodeCollator(tmg,train_mask,sampler)
c =collators[0].collate(train_mask)[2]
image

Hi @shijimozuihouyiren , would you mind providing more information, e.g., an runnable code snippet, your DGL version, PyTorch version, etc.? This will enable us to dive deeper.

Thanks for reply !I will take screenshots of my pytorch and dgl versions


Then I generated an ondrive share link for some of my data, you can try to run the ipynb file

The DGL version is pretty old. Now is already 1.0. Could you try upgrade DGL to see whether the issue still exists?

i have update my dgl version , but it doesn’t work

I checked the trainset I generated. I didn’t check the tensor.item() of the trainset before. In fact, there is a repeated generation, so the number of dstnodes nodes in the final generated subgraph is reduced.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.