Practical overview
When it fits
Use it when you have labelled graph data in the repository’s JSON format and want to experiment with capsule-based graph classification through a Python command-line workflow.
Who it is for
- Researchers exploring capsule-based graph neural networks and graph classification.
- Developers who want a research codebase for training on labelled graph-structured data.
Documented uses
- Train CapsGNN using graph examples stored as JSON.
- Set training parameters such as epochs, batch size, and model dimensions through command-line arguments.
- Generate graph-level predictions and embeddings for test graphs.
Requirements & limits
The repository is public and specifies a GPL-3.0 license. The README documents command-line use and does not describe a hosted inference service.
- Inputs require edges, node labels, and an integer target in each graph JSON file; node IDs and labels must be indexed from zero.
- The README lists Python 3.5.2 and specific development dependency versions, including PyTorch 1.1.0 and PyTorch Geometric 1.3.2.
- Training is handled by src/main.py, with documented options for dataset folders, prediction path, epochs, batch size, and model parameters.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare graph JSON inputs and configure a training run
Structure graph data and identify the documented options for training and prediction with CapsGNN.
Before you start
- The repository codebase and Python 3.5.2, the version listed by the README.
- The development package versions listed by the README, including PyTorch 1.1.0 and PyTorch Geometric 1.3.2.
- Training and test graph folders containing one JSON file per graph.
Steps
Store each graph in a JSON file with an edges list, a labels dictionary, and an integer target.
Index every node ID and node label from zero; use string keys for node IDs in the labels dictionary.
Place training and test graph files in the configured folders, which default to input/train/ and input/test/.
Use the documented src/main.py command-line options to set training and testing folders, prediction path, epochs, or batch size.
Expected outcome
A configured dataset and training run, with the README specifying that predictions and graph embeddings are saved under the output path.
Guide limitations
- This guide covers input preparation and documented options; it does not verify a successful run.
- The README's listed software versions are development versions and do not establish compatibility with other environments.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 4 November 2026
- Original website title
- benedekrozemberczki/CapsGNN · Official homepage title · retained in its source language

