Fb15k237¶
Wn18rr dataset.
Parameters¶
-
batch_size
-
shuffle – defaults to
True
-
pre_compute – defaults to
True
-
num_workers – defaults to
1
-
seed – defaults to
None
Attributes¶
-
name
-
train_triples
-
true_triples
Get all true triples from the dataset.
Examples¶
>>> from ckb import datasets
>>> dataset = datasets.Fb15k237(batch_size=1, pre_compute=True, shuffle=True, seed=42)
>>> dataset
Fb15k237 dataset
Batch size 1
Entities 14265
Relations 237
Shuffle True
Train triples 214443
Validation triples 42133
Test triples 52786
Methods¶
fetch
get_train_loader
Initialize train dataset loader.
Parameters
- mode
mapping_entities
Construct mapping entities.
mapping_relations
Construct mapping relations.