TradTestSampler¶
- class pybind11_ke.data.TradTestSampler(sampler: TradSampler, valid_file: str = 'valid2id.txt', test_file: str = 'test2id.txt', type_constrain: bool = True)[源代码]¶
平移模型和语义匹配模型的测试数据采样器。
- __init__(sampler: TradSampler, valid_file: str = 'valid2id.txt', test_file: str = 'test2id.txt', type_constrain: bool = True)[源代码]¶
创建 TradTestSampler 对象。
- 参数:
sampler (TradSampler) – 训练数据采样器。
valid_file (str) – valid2id.txt
test_file (str) – test2id.txt
type_constrain (bool) – 是否报告 type_constrain.txt 限制的测试结果
- __weakref__¶
list of weak references to the object (if defined)
- get_type_constrain_id()¶
读取 type_constrain.txt 文件。
- get_valid_test_triples_id()¶
读取
valid_file文件和test_file文件。
- sampler: Union[TradSampler, RGCNSampler, CompGCNSampler]¶
训练数据采样器