pytorch-geometric

Installation
SKILL.md

Overview

PyTorch Geometric (PyG) is built on top of PyTorch to simplify the implementation of Graph Neural Networks. It treats graphs as Data objects containing node features and edge indices, and provides a powerful MessagePassing base class for custom layer development.

When to Use

Use PyG for data that is naturally represented as a graph, such as social networks, molecular structures, or point clouds. Use it when you need to perform node classification, edge prediction, or graph-level regression.

Decision Tree

  1. Do you have a list of small graphs?
    • USE: torch_geometric.loader.DataLoader to create a single giant disjoint graph.
  2. Do you need to pool node features into a graph-level feature?
    • USE: global_mean_pool or global_max_pool using the batch vector.
  3. Are you building a custom convolution?
    • INHERIT: From torch_geometric.nn.MessagePassing.

Workflows

Related skills

More from cuba6112/skillfactory

Installs
2
First Seen
Feb 9, 2026