Pytorch Geometric ptr

Hi, Pytorch Community.

May I know what is ptr in this output?

from torch_geometric.loader import DataLoader
training_generator = DataLoader(train_dataset, 1, True,pin_memory = True, drop_last = True)
for batch_id, input in enumerate(training_generator):
  print(batch_id)
  print(input)

1 Like

If Iā€™m not wrong I think it is the selected batch number

A monotonically increasing pointer tensor that refers to the boundaries of segments such that ptr[0] = 0 and ptr[-1] = src.size(0). Hope this helps.