rotate_interaction
- rotate_interaction(h, r, t)[source]
Evaluate the RotatE interaction function.
Note
this method expects all tensors to be of complex datatype, i.e., torch.is_complex(x) to evaluate to True.
- 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.
- Return type
FloatTensor
- Returns
shape: batch_dims The scores.