Skip to content

Commit 5d66637

Browse files
committed
1.15.6
1 parent 37b6d68 commit 5d66637

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

pyabsa/core/apc/models/fast_lsa_t_v2.py

+11-17
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,17 @@ def forward(self, inputs):
6969
sent_out = self.post_linear(sent_out)
7070

7171
elif self.opt.lcf == 'fusion':
72-
# cdw_sent_out = self.CDW_LSA(global_context_features,
73-
# spc_mask_vec=spc_mask_vec,
74-
# lcf_matrix=lcf_cdw_matrix,
75-
# left_lcf_matrix=left_lcf_cdw_matrix,
76-
# right_lcf_matrix=right_lcf_cdw_matrix)
77-
# cdm_sent_out = self.CDM_LSA(global_context_features,
78-
# spc_mask_vec=spc_mask_vec,
79-
# lcf_matrix=lcf_cdm_matrix,
80-
# left_lcf_matrix=left_lcf_cdm_matrix,
81-
# right_lcf_matrix=right_lcf_cdm_matrix)
82-
# sent_out = self.fusion_linear(torch.cat((global_context_features, cdw_sent_out, cdm_sent_out), -1))
83-
sent_out = self.CDW_LSA(global_context_features,
84-
spc_mask_vec=spc_mask_vec,
85-
lcf_matrix=lcf_cdw_matrix,
86-
left_lcf_matrix=left_lcf_cdm_matrix,
87-
right_lcf_matrix=right_lcf_cdm_matrix)
88-
sent_out = torch.cat((global_context_features, sent_out), -1)
72+
cdw_sent_out = self.CDW_LSA(global_context_features,
73+
spc_mask_vec=spc_mask_vec,
74+
lcf_matrix=lcf_cdw_matrix,
75+
left_lcf_matrix=left_lcf_cdw_matrix,
76+
right_lcf_matrix=right_lcf_cdw_matrix)
77+
cdm_sent_out = self.CDM_LSA(global_context_features,
78+
spc_mask_vec=spc_mask_vec,
79+
lcf_matrix=lcf_cdm_matrix,
80+
left_lcf_matrix=left_lcf_cdm_matrix,
81+
right_lcf_matrix=right_lcf_cdm_matrix)
82+
sent_out = self.fusion_linear(torch.cat((global_context_features, cdw_sent_out, cdm_sent_out), -1))
8983
sent_out = self.post_linear(sent_out)
9084

9185
else:

release-note.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"1.15.6": {
33
"1": "Add classification report (including precision, recall, F1) display after training",
44
"2": "Add offline option to load huggingface model in inference: set get_xxx(offline=True) to auto detect and load local pretrained model",
5-
"3": "Add confusion matrix display after training"
5+
"3": "Add confusion matrix display after training",
6+
"4": "Fix lcf-fusion in fast-lsa-t-v2",
7+
"5": "Fix some typos",
8+
"6": "Rename MOOC-En dataset to MOOC_En"
69
},
710
"1.15.5": {
811
"1": "Minor fixes of tad inference"

0 commit comments

Comments
 (0)