LabelBatch#
Module to build Graph objects and perform operations on them.
- class LabelBatch(*args: Any, **kwargs: Any)[source]#
Bases:
BatchExtends the
Batchclass to includeLabelTensorobjects.- Example:
>>> import torch >>> from pina.graph import Graph, LabelBatch >>> graphs = [Graph(pos=torch.randn(3, 2), ... edge_index=torch.tensor([[0, 1], [1, 0]])) for _ in range(2)] >>> batch = LabelBatch.from_data_list(graphs) >>> batch.num_graphs 2