QuatEInteraction

class QuatEInteraction[source]

Bases: FunctionalInteraction[FloatTensor, FloatTensor, FloatTensor]

A module wrapper for the QuatE interaction function.

See also

pykeen.nn.functional.quat_e_interaction()

Initialize the interaction module.

Attributes Summary

entity_shape

The symbolic shapes for entity representations

relation_shape

The symbolic shapes for relation representations

Methods Summary

func(r, t, table)

Evaluate the interaction function of QuatE for given embeddings.

Attributes Documentation

entity_shape: Sequence[str] = ('dk',)

The symbolic shapes for entity representations

relation_shape: Sequence[str] = ('dk',)

The symbolic shapes for relation representations

Methods Documentation

func(r, t, table)

Evaluate the interaction function of QuatE for given embeddings.

The embeddings have to be in a broadcastable shape.

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

  • r (FloatTensor) – shape: (*batch_dims, dim, 4) The head representations.

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

  • table (FloatTensor) – the quaternion multiplication table.

Returns:

shape: (…) The scores.