SLCWATrainingLoop
- class SLCWATrainingLoop(negative_sampler: str | NegativeSampler | type[NegativeSampler] | None = None, negative_sampler_kwargs: Mapping[str, Any] | None = None, **kwargs)[source]
Bases:
TrainingLoop
[tuple
[Tensor
,Tensor
,Tensor
|None
],SLCWABatch
]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:
negative_sampler (str | NegativeSampler | type[NegativeSampler] | None) – The class, instance, or name of the negative sampler
negative_sampler_kwargs (Mapping[str, Any] | None) – Keyword arguments to pass to the negative sampler class on instantiation for every positive one
kwargs – Additional keyword-based parameters passed to TrainingLoop.__init__