um_interaction

um_interaction(h, t, p, power_norm=True)[source]

Evaluate the SimplE interaction function.

Parameters
  • h (FloatTensor) – shape: (*batch_dims, dim) The head representations.

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

  • p (int) – The parameter p for selecting the norm.

  • power_norm (bool) – Whether to return the powered norm instead.

Return type

FloatTensor

Returns

shape: batch_dims The scores.