benedekrozemberczki / pytorch_geometric_temporal

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

Help in how to use TGCN #216

Closed victorsergio closed 1 year ago

victorsergio commented 1 year ago

Hi, I'm trying to understand how to implement a model that uses TGCN to predict n future timesteps utilizing an input of n timesteps.

From what I read in the source code, TGCN is a cell that can only process a single timestep. Is this true?

If I want to process n input timesteps, do I have to create a for loop to process the inputs sequentially by the TGCN cell?

As an analogy to a Seq2Seq traditional LSTM model, if I would like to build a seq2seq TGCN model, must I first create a TGCN layer that processes the inputs sequentially with a TGCN cell inside?

In the ChickenPox TGCN example, this is the output of next(iter(dataset)):

Data(x=[20, 4], edge_index=[2, 102], edge_attr=[102], y=[20])

Does this mean that x=[20,4] is a tensor with four sequential weekly count values for each of the 20 counties? The sequences' timesteps are encoded as node-features?

I would appreciate your help. Many thanks.