terminator.models.layers.graph_features.PositionalEncodings¶
- class terminator.models.layers.graph_features.PositionalEncodings(num_embeddings)[source]¶
Bases:
ModuleModule to generate differential positional encodings for protein graph edges
- __init__(num_embeddings)[source]¶
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Methods
__init__(num_embeddings)Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(E_idx)Generate directional differential positional encodings for edges
Attributes
T_destinationalias of TypeVar('T_destination', bound=
Mapping[str,Tensor])dump_patchesThis allows better BC support for
load_state_dict().- forward(E_idx)[source]¶
Generate directional differential positional encodings for edges
- Parameters:
E_idx (torch.LongTensor) – Protein kNN edge indices Shape: n_batches x seq_len x k
- Returns:
E – Directional Diffential positional encodings for edges Shape: n_batches x seq_len x k x num_embeddings
- Return type:
torch.Tensor