- class LowRankRepresentation(*, max_id, shape, num_bases=3, weight_initializer=<pykeen.utils.compose object>, **kwargs)
Low-rank embedding factorization.
This representation reduces the number of trainable parameters by not learning independent weights for each index, but rather having shared bases among all indices, and only learn the weights of the linear combination.\[E[i] = \sum_k B[i, k] * W[k]\]
Initialize the representations.
int) – the maximum ID (exclusively). Valid Ids reach from 0, …, max_id-1
int) – the number of bases. More bases increase expressivity, but also increase the number of trainable parameters.
FloatTensor]) – the initializer for basis weights
kwargs – additional keyword based arguments passed to
pykeen.nn.representation.Embedding, which is used for the base representations.
Return the number of bases.
Reset the module's parameters.