Skip to content

Commit d338dbe

Browse files
authored
Update dataloader.py
update sent2doc by adding tffrac. See #19
1 parent 7f020fc commit d338dbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/dataloader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def CreateGraph(self, docLen, sent_pad, doc_pad, label, w2s_w, w2d_w):
382382
# s2d
383383
docid = sent2doc[i]
384384
docnid = docid2nid[docid]
385-
G.add_edge(sent_nid, docnid, data={"dtype": torch.Tensor([2])})
385+
G.add_edge(sent_nid, docnid, data={"tffrac": torch.LongTensor([0]), "dtype": torch.Tensor([2])})
386386

387387
# add doc edges
388388
for i in range(article_num):

0 commit comments

Comments
 (0)