What does the collate function in pytorch (geometric)?
What collate does and why:


  Because saving a huge python list is really slow, we collate the list into one huge torch_geometric.data.Data object via torch_geometric.data.InMemoryDataset.collate() before saving . The collated data object has concatenated all examples into one big data object and, in addition, returns a slices dictionary to reconstruct single examples from this object. Finally, we need to load these two objects in the constructor into the properties self.data and self.slices.


Source