benedekrozemberczki / pytorch_geometric_temporal

PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models (CIKM 2021)
MIT License
2.58k stars 367 forks source link

StaticHeteroGraphTemporalSignalBatch #228

Closed MicheleSodano closed 1 year ago

MicheleSodano commented 1 year ago

Hi, I am trying to implement a Hetero Spatial-Temporal GNN which uses HeteroConv with two SAGEConv layers to generate the embedding of nodes in each snapshot, then concatenate the node embeddings from all snapshots, and use a custom 1D ResNet to predict the target value of a specific node type. I am using StaticHeteroGraphTemporalSignal to convert several StaticHeteroGraphs created using Networkx (DiGraph) into HeteroData objects.

How can I efficiently create a dataloader to train a heteroGNN model over multiple snapshots?

Can I get an example of how to use StaticHeteroGraphTemporalSignalBatch to create batches of 120 snapshots for a StaticHeteroGraph that contains 8760 snapshots in total?

Additionally, Is there a way to train using batches and multiple StaticHeteroGraphs when the edge_index_dict is different from Graph to Graph?

gbastiandillo commented 1 year ago

Hi @MicheleSodano, did you get any example of StaticHeteroGraphTemporalSignalBatch?