DistMultLiteralGated

class DistMultLiteralGated(triples_factory: TriplesNumericLiteralsFactory, embedding_dim: int = 50, input_dropout: float = 0.0, **kwargs)[源代码]

基础类:LiteralModel

使用来自[kristiadi2018]的Gated DistMult交互实现的LiteralE模型。

这个模型与pykeen.models.DistMultLiteral不同,因为它使用了一个门(如在LSTMs中找到的)而不是LinearDropout模块。

这个门实现了LiteralE论文中描述的完整\(g\)函数(见公式4)。

初始化模型。

Parameters:
  • triples_factory (TriplesNumericLiteralsFactory) – (训练)三元组工厂

  • embedding_dim (int) – 嵌入维度

  • input_dropout (float) – 输入dropout,参见 DistMultCombination.__init__()

  • kwargs – 传递给 LiteralModel.__init__() 的额外基于关键字的参数

属性摘要

hpo_default

优化模型超参数的默认策略

loss_default_kwargs

默认损失函数类的默认参数

属性文档

hpo_default: ClassVar[Mapping[str, Any]] = {'embedding_dim': {'high': 256, 'low': 16, 'q': 16, 'type': <class 'int'>}, 'input_dropout': {'high': 0.5, 'low': 0.0, 'q': 0.1, 'type': <class 'float'>}}

优化模型超参数的默认策略

loss_default_kwargs: ClassVar[Mapping[str, Any]] = {'margin': 0.0}

默认损失函数类的默认参数