Initialization

Embedding weight initialization routines.

Functions

xavier_uniform_(tensor[, gain])

Initialize weights of the tensor similarly to Glorot/Xavier initialization.

xavier_normal_(tensor[, gain])

Initialize weights of the tensor similarly to Glorot/Xavier initialization.

init_phases(x)

Generate random phases between 0 and \(2\pi\).

Classes

PretrainedInitializer(tensor)

Initialize tensor with pretrained weights.

LabelBasedInitializer(labels[, encoder, ...])

An initializer using pretrained models from the transformers library to encode labels.

WeisfeilerLehmanInitializer(*[, ...])

An initializer based on an encoding of categorical colors from the Weisfeiler-Lehman algorithm.

RandomWalkPositionalEncodingInitializer(*[, ...])

Initialize nodes via random-walk positional encoding.

Variables

xavier_uniform_norm_

A class representing the composition of several functions.

xavier_normal_norm_

A class representing the composition of several functions.

uniform_norm_

A class representing the composition of several functions.

uniform_norm_p1_

A class representing the composition of several functions.

normal_norm_

A class representing the composition of several functions.

initializer_resolver

A resolver for initializers, including elements from pykeen.nn.init

Class Inheritance Diagram

Inheritance diagram of pykeen.nn.init.PretrainedInitializer, pykeen.nn.init.LabelBasedInitializer, pykeen.nn.init.WeisfeilerLehmanInitializer, pykeen.nn.init.RandomWalkPositionalEncodingInitializer