LiteralModel
- class LiteralModel(triples_factory: TriplesNumericLiteralsFactory, interaction: str | Interaction[Tensor, Tensor, Tensor] | type[Interaction[Tensor, Tensor, Tensor]] | None, entity_representations: str | Representation | type[Representation] | None | Sequence[str | Representation | type[Representation] | None] = None, entity_representations_kwargs: Mapping[str, Any] | None | Sequence[Mapping[str, Any] | None] = None, combination: str | Combination | type[Combination] | None = None, combination_kwargs: Mapping[str, Any] | None = None, **kwargs)[源代码]
基础类:
ERModel[tuple[Tensor,Tensor],Tensor,tuple[Tensor,Tensor]]使用来自
pykeen.nn.combinations组合的实体字面量模型的基类。初始化模型。
- Parameters:
triples_factory (TriplesNumericLiteralsFactory) – (训练)三元组工厂
交互 (Interaction) – 交互函数
entity_representations (Sequence[Representation]) – 实体表示(不包括来自字面量的表示)
entity_representations_kwargs (Mapping[str, Any] | None | Sequence[Mapping[str, Any] | None]) – 实体表示的关键字参数(不包括字面量的参数)
组合 (str | Combination | type[Combination] | None) – 实体和字面量表示的组合
combination_kwargs (Mapping[str, Any] | None) – 用于实例化组合的基于关键字的参数
kwargs – 传递给
ERModel.__init__()的额外基于关键字的参数