diff --git a/Helpers/path_utils.py b/Helpers/path_utils.py index ef48911..fe25da3 100644 --- a/Helpers/path_utils.py +++ b/Helpers/path_utils.py @@ -4,11 +4,16 @@ def get_base_path(): BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) return BASE -def get_sick_path(): +def get_sick_cache_path(): BASE = get_base_path() PATH = os.path.join(BASE,'data/cache/SICK_cache.pkl') return PATH +def get_sick_path(): + BASE = get_base_path() + PATH = os.path.join(BASE, 'data/SICK.txt') + return PATH + def get_babi_ans_extract_path(extension="json"): BASE = get_base_path() PATH = os.path.join(BASE, 'data/ans_extraction/babi/{}/'.format(extension)) diff --git a/Helpers/preprocess.py b/Helpers/preprocess.py index ad9936d..fc2ec71 100644 --- a/Helpers/preprocess.py +++ b/Helpers/preprocess.py @@ -68,7 +68,7 @@ def get_input_tree(): def get_final_input(): from os import path as path import pickle as pkl - file_path = path.join(path.dirname(path.dirname(path.realpath(__file__))), 'data/cache/SICK_cache.pkl') + file_path = path_utils.get_sick_cache_path() dataset_dtree, dataset_dtne = get_final_input_from_path( file_path, SICK.get_input_tree diff --git a/data b/data index b5bd560..61cf1c4 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit b5bd5604d801894af980f724b4230e2ece78a53b +Subproject commit 61cf1c46680396c350b24abce7b7903a6d646ffd diff --git a/test.py b/test.py index bff6d7d..00219f3 100644 --- a/test.py +++ b/test.py @@ -6,6 +6,7 @@ def test_dt_rnn(): from Helpers import utils model = DT_RNN(dim=3, word_vector_size=3) + model.theano_build() np_W_dep = model.W_dep.get_value() np_W_x = model.W_x.get_value()