cp_interaction
- cp_interaction(h, r, t)[source]
Evaluate the Canonical Tensor Decomposition interaction function.
- Parameters:
h (
FloatTensor
) – shape: (*batch_dims, rank, dim) The head representations.r (
FloatTensor
) – shape: (*batch_dims, rank, dim) The relation representations.t (
FloatTensor
) – shape: (*batch_dims, rank, dim) The tail representations.
- Return type:
FloatTensor
- Returns:
shape: batch_dims The scores.