Graph Embedder¶
The Task¶
This task consists of creating an embedding of a graph. That is, a vector of features which can be used for a downstream task.
The GraphEmbedder
and GraphClassificationData
classes internally rely on pytorch-geometric.
Example¶
Let’s look at generating embeddings of graphs from the KKI data set from TU Dortmund University.
We start by creating the TUDataset <https://pytorch-geometric.readthedocs.io/en/latest/_modules/torch_geometric/datasets/tu_dataset.html#TUDataset>.
Next, we load a trained GraphEmbedder
(from a previously trained GraphClassifier
).
Finally, we save the model.
Here’s the full example:
import flash
To learn how to view the available backbones / heads for this task, see Backbones and Heads.