6c47841409f193e62755b35af7ceb815f1c4f807,examples/train_distmult.py,,,#,6

Before Change


//Input training files from benchmarks/FB15K/ folder.
con.set_in_path("./benchmarks/FB15K/")
//True: Input test files from the same folder.
con.set_test_flag(True)

con.set_work_threads(4)
con.set_train_times(500)
con.set_nbatches(100)
con.set_alpha(0.1)
con.set_bern(0)
con.set_dimension(100)
con.set_ent_neg_rate(1)
con.set_rel_neg_rate(0)
con.set_opt_method("Adagrad")

//Models will be exported via tf.Saver() automatically.
con.set_export_files("./res/model.vec.tf", 0)
//Model parameters will be exported to json files automatically.
con.set_out_files("./res/embedding.vec.json")
//Initialize experimental settings.
con.init()
//Set the knowledge embedding model
con.set_model(models.DistMult)

After Change


import json

con = config.Config()
con.set_test_flag(True)
con.set_in_path("./benchmarks/FB15K/")
con.set_out_path("./benchmarks/FB15K/a.vec")
// con.set_export_files("res.vec")
//con.set_import_files("res.vec")
// con.set_export_steps(10)
con.set_log_on(1)
con.set_work_threads(8)
con.set_train_times(1000)
con.set_nbatches(100)	
con.set_alpha(0.1)
con.set_bern(1)
con.set_dimension(50)
con.set_margin(1.0)
con.set_ent_neg_rate(1)
con.set_rel_neg_rate(0)
con.set_opt_method("adagrad")
con.init()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: thunlp/OpenKE
Commit Name: 6c47841409f193e62755b35af7ceb815f1c4f807
Time: 2018-01-21
Author: 1120991665@qq.com
File Name: examples/train_distmult.py
Class Name:
Method Name:


Project Name: thunlp/OpenKE
Commit Name: 6c47841409f193e62755b35af7ceb815f1c4f807
Time: 2018-01-21
Author: 1120991665@qq.com
File Name: examples/train_rescal.py
Class Name:
Method Name:


Project Name: thunlp/OpenKE
Commit Name: 6c47841409f193e62755b35af7ceb815f1c4f807
Time: 2018-01-21
Author: 1120991665@qq.com
File Name: examples/train_complex.py
Class Name:
Method Name: