forked from wliu88/AttentivePathRanking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
19 lines (13 loc) · 797 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from main.playground.model2.CompositionalVectorAlgorithm import CompositionalVectorAlgorithm
def test_fb():
cvsm = CompositionalVectorAlgorithm("freebase", "data/fb15k237/cvsm_entity",
entity_type2vec_filename=None,
pooling_method="sat", attention_method="sat", early_stopping_metric="map")
cvsm.train_and_test()
def test_wn():
cvsm = CompositionalVectorAlgorithm("wordnet", experiment_dir="data/wn18rr/cvsm_entity",
entity_type2vec_filename="data/wn18rr/entity_type2vec.pkl",
pooling_method="sat", attention_method="sat", early_stopping_metric="map")
cvsm.train_and_test()
if __name__ == "__main__":
test_wn()