terminator.models.layers.condense.ResidueFeatures¶
- class terminator.models.layers.condense.ResidueFeatures(hparams)[source]¶
Bases:
ModuleModule which featurizes TERM match residue information
- Variables:
embedding (nn.Embedding) – Embedding layer for residue identities (represented as int)
relu (nn.ReLU) – ReLU activation layer
tanh (nn.Tanh) – tanh activation layer
lin2 (lin1,) – Embedding layers
bn (nn.BatchNorm2d) – Batch Normalization for features
- __init__(hparams)[source]¶
- Parameters:
hparams (dict) – Dictionary of model hparams (see
~/scripts/models/train/default_hparams.jsonfor more info)
Methods
__init__(hparams)- Parameters:
hparams (dict) -- Dictionary of model hparams (see
~/scripts/models/train/default_hparams.jsonfor more info)
forward(X, features)Featurize TERM matches and their associated features
Attributes
T_destinationalias of TypeVar('T_destination', bound=
Mapping[str,Tensor])dump_patchesThis allows better BC support for
load_state_dict().- forward(X, features)[source]¶
Featurize TERM matches and their associated features
- Parameters:
X (torch.LongTensor) – Match residue identities Shape: n_batches x n_matches x sum_term_len
features (torch.Tensor) – Features associated with match residues (e.g. torsion angles, RMSD, environment value Shape: n_batches x n_matches x sum_term_len x NUM_TERM_FEATURES
- Returns:
out – Featurized TERM match residues Shape: n_batches x n_hidden x sum_term_len x n_alignments
- Return type:
torch.Tensor