LpDistancePow

class KGE.score.LpDistancePow[source]

Bases: KGE.score.Score

An implementation of negative squared Lp-distance.

Score between \(\textbf{x}\) and \(\textbf{y}\) is defined as \(- \left\| \textbf{x} - \textbf{y} \right\|_p^2\)

Methods Summary

__call__(x, y)

Calculate score.

Methods Documentation

__call__(x, y)[source]

Calculate score.

Parameters
  • x (tf.Tensor) –

  • y (tf.Tensor) –

__init__(p)[source]

Initialize score.

__new__(*args, **kwargs)