terminator.models.layers.gvp.GVP¶
- class terminator.models.layers.gvp.GVP(in_dims, out_dims, h_dim=None, activations=(<function relu>, <built-in method sigmoid of type object>), vector_gate=False)[source]¶
Bases:
ModuleGeometric Vector Perceptron. See manuscript and README.md for more details.
- Parameters:
in_dims – tuple (n_scalar, n_vector)
out_dims – tuple (n_scalar, n_vector)
h_dim – intermediate number of vector channels, optional
activations – tuple of functions (scalar_act, vector_act)
vector_gate – whether to use vector gating. (vector_act will be used as sigma^+ in vector gating if True)
- __init__(in_dims, out_dims, h_dim=None, activations=(<function relu>, <built-in method sigmoid of type object>), vector_gate=False)[source]¶
Initializes internal Module state, shared by both nn.Module and ScriptModule.
Methods
__init__(in_dims, out_dims[, h_dim, ...])Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(x)- param x:
tuple (s, V) of torch.Tensor,
Attributes
T_destinationalias of TypeVar('T_destination', bound=
Mapping[str,Tensor])dump_patchesThis allows better BC support for
load_state_dict().