google-deepmind / google-deepmind/graph_nets

Training on batches of GraphsTuples?

Open
#147 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.4k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

Let's say I want to train an LSTM or transformer on sequences of graphs using Sonnet2/TF2:

I want to represent the graphs in each sequence as one ```GraphsTuple```, which means my batches are essentially an iterable of ```GraphsTuple```s, each with a variable number of graphs. This is great until it's time to get the input signature and compile the update step. It's unclear to me how to define the tensorspec for this type of input. Is my best route to subclass ```collections.namedtuple()``` similar to how you define a ```GraphsTuple```, or can you suggest a more elegant solution?

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.