Batches for Transductive Learning #4097
-
Hello everyone, I have a question about sampling batches with NeighborLoader(). So far I have done inductive training on my data graph and sampled batches as follows: train_loader = NeighborLoader(data, As fas as I understood the NeighborLoader samples batches in a way that the first |batch_size| nodes are the ones I want to make predictions for and the following ones are the necessary neighbours. So I make predictions like this: out = model(batch.x, batch.adj_t)[:args.batch_size] Now, in a transductive learning setting, I would like the nodes for which I make predictions (the first |batch_size| nodes of the batch) to come ONLY from the training set while the sampled neighbour nodes from whatever subset. Does anyone know how I can create batches for a transductive learning setting? Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
You can use the
|
Beta Was this translation helpful? Give feedback.
You can use the
batch_size
in the data object returned by theloader
, the firstbatch_size
nodes will be ininput_nodes
.