perceve
perceve

Reputation: 1

How to handle temporal dimension with Graph Neural Networks

I've just starting using PyTorch Geometric, and for my problem I have batched data with a time dimension. My tensor has shape [batch, seq_len, nodes, features].

I want to apply the GCNConv layer separately to each seq_len step, but the GCNConv layer expects an input of [Nodes, Features], as mentioned in the docs.

I read on this issue github discussion

You need to permute your matrix to shape [batch_size, time_seq, num_nodes, num_feat]

But I'm not sure if I'm getting it correctly. Can I pass the tensor with this shape directly to the GCNConv layer and it will be applied to each seq_len step independently, or should I reshape to [batch * nodes, seq_len * features] before feeding it into the layer?

Thanks in advance for the help!

Upvotes: 0

Views: 134

Answers (0)

Related Questions