terminator.models.layers.energies.gvp.GVPPairEnergies

class terminator.models.layers.energies.gvp.GVPPairEnergies(hparams)[source]

Bases: Module

GNN Potts Model Encoder using GVP

Parameters:
  • node_in_dim – node dimensions in input graph, should be (6, 3) if using original features

  • node_h_dim – node dimensions to use in GVP layers

  • node_in_dim – edge dimensions in input graph, should be (32, 1) if using original features

  • edge_h_dim – edge dimensions to embed to before use in GVP layers

  • num_layers – number of GVP layers in each of the encoder and decoder modules

  • drop_rate – rate to use in all dropout layers

__init__(hparams)[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

Methods

__init__(hparams)

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(h_V, edge_index, h_E)

Forward pass to be used at train-time, or evaluating likelihood.

Attributes

T_destination

alias of TypeVar('T_destination', bound=Mapping[str, Tensor])

dump_patches

This allows better BC support for load_state_dict().

forward(h_V, edge_index, h_E)[source]

Forward pass to be used at train-time, or evaluating likelihood.

Parameters:
  • h_V – tuple (s, V) of node embeddings

  • edge_indextorch.Tensor of shape [2, num_edges]

  • h_E – tuple (s, V) of edge embeddings