complex_interaction

complex_interaction(h, r, t)[source]

Evaluate the ComplEx interaction function.

\[Re(\langle h, r, conj(t) \rangle)\]
Parameters
  • h (FloatTensor) – shape: (*batch_dims, 2*dim) The complex head representations.

  • r (FloatTensor) – shape: (*batch_dims, 2*dim) The complex relation representations.

  • t (FloatTensor) – shape: (*batch_dims, 2*dim) The complex tail representations.

Return type

FloatTensor

Returns

shape: batch_dims The scores.