graph2mat.bindings.torch.TorchGraph2Mat

class graph2mat.bindings.torch.TorchGraph2Mat(*args, numpy: ~types.ModuleType = <module 'torch' from '/opt/hostedtoolcache/Python/3.11.11/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]

Bases: Graph2Mat, Module

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 a torch.nn.ModuleList and the dictionary of edge block functions as a torch.nn.ModuleDict.

Parameters:

**kwargs – Additional arguments passed to the Graph2Mat class.

See also

Graph2Mat

The class that TorchGraph2Mat extends. Its documentation contains a more detailed explanation of the inner workings of the class.

Methods

Attributes

basis_table

The table holding all information about the basis.

self_interactions

List of self interaction functions (which compute node blocks).

interactions

Dictionary of interaction functions (which compute edge blocks).

training