SLCWATrainingLoop
- class SLCWATrainingLoop(*, triples_factory, negative_sampler=None, negative_sampler_kwargs=None, **kwargs)[source]
Bases:
pykeen.training.training_loop.TrainingLoop
[pykeen.triples.instances.SLCWASampleType
,Tuple
[torch.LongTensor
,torch.LongTensor
,Optional
[torch.BoolTensor
]]]A training loop that uses the stochastic local closed world assumption training approach.
[ruffinelli2020] call the sLCWA
NegSamp
in their work.Initialize the training loop.
- Parameters
triples_factory (
CoreTriplesFactory
) – The training triples factory. Also passed to TrainingLoop.__init__negative_sampler (
Union
[str
,NegativeSampler
,Type
[NegativeSampler
],None
]) – The class, instance, or name of the negative samplernegative_sampler_kwargs (
Optional
[Mapping
[str
,Any
]]) – Keyword arguments to pass to the negative sampler class on instantiation for every positive onekwargs – Additional keyword-based parameters passed to TrainingLoop.__init__