SLCWALitModule
- class SLCWALitModule(*, negative_sampler: str | NegativeSampler | type[NegativeSampler] | None = None, negative_sampler_kwargs: Mapping[str, Any] | None = None, **kwargs)[source]
Bases:
LitModule
A PyTorch Lightning module for training a model with sLCWA training loop.
Initialize the lightning module.
- Parameters:
negative_sampler (str | NegativeSampler | type[NegativeSampler] | None) – the negative sampler, cf.
pykeen.triples.CoreTriplesFactory.create_slcwa_instances()
negative_sampler_kwargs (Mapping[str, Any] | None) – keyword-based parameters passed to the negative sampler, cf.
pykeen.triples.CoreTriplesFactory.create_slcwa_instances()
kwargs – additional keyword-based parameters passed to
LitModule.__init__()