WeisfeilerLehmanInitializer
- class WeisfeilerLehmanInitializer(*, color_initializer=None, color_initializer_kwargs=None, shape=32, edge_index=None, num_entities=None, mapped_triples=None, triples_factory=None, **kwargs)[source]
Bases:
PretrainedInitializerAn initializer based on an encoding of categorical colors from the Weisfeiler-Lehman algorithm.
Initialize the initializer.
- Parameters:
color_initializer (
Union[str,Callable[[FloatTensor],FloatTensor],None]) – the initializer for initialization color representations, or a hint thereofcolor_initializer_kwargs (
Optional[Mapping[str,Any]]) – additional keyword-based parameters for the color initializershape (
Union[int,Sequence[int]]) – the shape to use for the color representationsedge_index (
Optional[LongTensor]) – shape: (2, m) the edge indexnum_entities (
Optional[int]) – the number of entities. can be inferredmapped_triples (
Optional[LongTensor]) – shape: (m, 3) the Id-based triplestriples_factory (
Optional[CoreTriplesFactory]) – the triples factorykwargs – additional keyword-based parameters passed to
pykeen.utils.iter_weisfeiler_lehman()