benedekrozemberczki / pytorch_geometric_temporal

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

How do I batch my StaticHeteroGraphTemporalSignal? #164

Closed DanielPerezJensen closed 2 years ago

DanielPerezJensen commented 2 years ago

I see in the documentation there is a way to batch temporal signals, and specifically StaticHeteroGraphTemporalSignal datasets. In it, the parameters given all make sense to me, except for the parameter batch_dict. How to use/create this dictionary is unclear to me, and it doesn't seem to be explained in the documentation. Is this a PyTorch Geometric thing, or do you maybe have any guidance as to how to create this dictionary?

Thanks in advance.

benedekrozemberczki commented 2 years ago

You can use the diagonal batching method:

https://user-images.githubusercontent.com/7347296/34198790-eb5bec96-e56b-11e7-90d5-157800e042de.png