Closed Lee-zix closed 3 years ago
Hi,
To predict (s_t,r_t, ??), graph_dict[t-1] (latest_time=t-1) should be used not graph_dict[t]. In the inference time, two things are done: building (or sampling) graphs until t-1, and based on the sampled graphs, predict (s_t, r_t, ??) at time t.
If you have another question, please leave a comment!
Thanks very much for your reply!!! It helps a lot!
In the line 224 of model.py , you use global_emb_prev_t, sub, prob_sub = global_model.predict(t, self.graphdict, subject=True) to get H{t-1} and s_t (according to you notes in the line 81 of global_model.py # Predict s at time t, so <t-1 graphs are used.) then you sample G_t and add to s_his_cache and o_his_cache, and in the line 301-302 of model.py, self.data = get_data(self.s_his_cache, self.o_his_cache) self.graph_dict[self.latest_time.item()] = get_big_graph(self.data, self.num_rels) you add G_t to graph_dict.
I think the line 302 of model.py should be: self.graph_dict[t] = get_big_graph(self.data, self.num_rels)
And why you add the sampled G_t to history when predicting (s_t, r_t, ??)
Are these codes the version of your EMNLP2020 paper?? Is there some misunderstanding of your codes?
Thanks very much for your reply!