dgn.toy_dgn
- class pydgn.model.dgn.toy_dgn.ToyDGN(dim_node_features, dim_edge_features, dim_target, readout_class, config)
Bases:
pydgn.model.interface.ModelInterface
A toy Deep Graph Network used to test the library
- forward(data: torch_geometric.data.batch.Batch) Tuple[torch.Tensor, Optional[torch.Tensor], Optional[List[object]]]
Performs a forward pass over a batch of graphs
- Parameters
data (
torch_geometric.data.Batch
) – a batch of graphs- Returns
a tuple (model’s output, [optional] node embeddings, [optional] additional outputs
- training: bool
dgn.toy_mlp
- class pydgn.model.dgn.toy_mlp.ToyMLP(dim_node_features, dim_edge_features, dim_target, readout_class, config)
Bases:
pydgn.model.interface.ModelInterface
A toy MLP model used to test the library. Technically, a DGN that ignores the adjacency matrix.
- forward(data: torch_geometric.data.batch.Batch) Tuple[torch.Tensor, Optional[torch.Tensor], Optional[List[object]]]
Performs a forward pass over a batch of graphs
- Parameters
data (
torch_geometric.data.Batch
) – a batch of graphs- Returns
a tuple (model’s output, [optional] node embeddings, [optional] additional outputs
- training: bool