graph2mat.bindings.torch.TorchGraph2Mat
- class graph2mat.bindings.torch.TorchGraph2Mat(*args, numpy: ~types.ModuleType = <module 'torch' from '/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/torch/__init__.py, self_interactions_list=torch.nn.modules.container.ModuleList, interactions_dict=torch.nn.modules.container.ModuleDict, **kwargs)[source]
-
Wrapper for Graph2Mat to make it use torch instead of numpy.
It also makes Graph2Mat a
torch.nn.Module, and it makes it store the list of node block functions as atorch.nn.ModuleListand the dictionary of edge block functions as atorch.nn.ModuleDict.- Parameters:
**kwargs – Additional arguments passed to the Graph2Mat class.
See also
Graph2MatThe class that
TorchGraph2Matextends. Its documentation contains a more detailed explanation of the inner workings of the class.
Methods
Attributes
basis_tableThe table holding all information about the basis.
self_interactionsList of self interaction functions (which compute node blocks).
interactionsDictionary of interaction functions (which compute edge blocks).
graph2mat_tableThe basis table used internally by graph2mat
types_to_graph2matThe mapping of types from the original basis to the graph2mat basis.
edge_types_to_graph2matThe mapping of edge types from the original basis to the graph2mat basis.
basis_filtersIf the
basis_groupingis "max", this is a mask that is used to select the values for the original basis from the new grouped basis.node_filtersIf the
basis_groupingis "max", mask to select values from node operations This has shape (n_point_types, dim_new_basis, dim_new_basis).edge_filtersIf the
basis_groupingis "max", mask to select values from edge operations This has shape (n_edge_types, dim_new_basis, dim_new_basis).training