InverseInDegreeEdgeWeighting

class InverseInDegreeEdgeWeighting[source]

Bases: pykeen.nn.weighting.EdgeWeighting

Normalize messages by inverse in-degree.

Initializes internal Module state, shared by both nn.Module and ScriptModule.

Methods Summary

forward(source, target)

Compute edge weights.

Methods Documentation

forward(source, target)[source]

Compute edge weights.

Parameters
  • source (LongTensor) – shape: (num_edges,) The source indices.

  • target (LongTensor) – shape: (num_edges,) The target indices.

Return type

FloatTensor

Returns

shape: (num_edges,) The edge weights.