terminator.models.layers.s2s_modules.EdgeTransformerLayer¶
- class terminator.models.layers.s2s_modules.EdgeTransformerLayer(num_hidden, num_in, num_heads=4, dropout=0.1)[source]¶
Bases:
Module- __init__(num_hidden, num_in, num_heads=4, dropout=0.1)[source]¶
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Methods
__init__(num_hidden, num_in[, num_heads, ...])Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(h_E, h_EV, E_idx[, mask_E, mask_attend])Parallel computation of full transformer layer
Attributes
T_destinationalias of TypeVar('T_destination', bound=
Mapping[str,Tensor])dump_patchesThis allows better BC support for
load_state_dict().