ermlp_interaction
- ermlp_interaction(h, r, t, hidden, activation, final)[source]
Evaluate the ER-MLP interaction function.
- Parameters:
h (
FloatTensor) – shape: (*batch_dims, dim) The head representations.r (
FloatTensor) – shape: (*batch_dims, dim) The relation representations.t (
FloatTensor) – shape: (*batch_dims, dim) The tail representations.hidden (
Linear) – The first linear layer.activation (
Module) – The activation function of the hidden layer.final (
Linear) – The second linear layer.
- Return type:
FloatTensor- Returns:
shape: batch_dims The scores.