Skip to content

Commit

Permalink
1.15.6
Browse files Browse the repository at this point in the history
  • Loading branch information
yangheng95 committed Jun 30, 2022
1 parent 37b6d68 commit 5d66637
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
28 changes: 11 additions & 17 deletions pyabsa/core/apc/models/fast_lsa_t_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,17 @@ def forward(self, inputs):
sent_out = self.post_linear(sent_out)

elif self.opt.lcf == 'fusion':
# cdw_sent_out = self.CDW_LSA(global_context_features,
# spc_mask_vec=spc_mask_vec,
# lcf_matrix=lcf_cdw_matrix,
# left_lcf_matrix=left_lcf_cdw_matrix,
# right_lcf_matrix=right_lcf_cdw_matrix)
# cdm_sent_out = self.CDM_LSA(global_context_features,
# spc_mask_vec=spc_mask_vec,
# lcf_matrix=lcf_cdm_matrix,
# left_lcf_matrix=left_lcf_cdm_matrix,
# right_lcf_matrix=right_lcf_cdm_matrix)
# sent_out = self.fusion_linear(torch.cat((global_context_features, cdw_sent_out, cdm_sent_out), -1))
sent_out = self.CDW_LSA(global_context_features,
spc_mask_vec=spc_mask_vec,
lcf_matrix=lcf_cdw_matrix,
left_lcf_matrix=left_lcf_cdm_matrix,
right_lcf_matrix=right_lcf_cdm_matrix)
sent_out = torch.cat((global_context_features, sent_out), -1)
cdw_sent_out = self.CDW_LSA(global_context_features,
spc_mask_vec=spc_mask_vec,
lcf_matrix=lcf_cdw_matrix,
left_lcf_matrix=left_lcf_cdw_matrix,
right_lcf_matrix=right_lcf_cdw_matrix)
cdm_sent_out = self.CDM_LSA(global_context_features,
spc_mask_vec=spc_mask_vec,
lcf_matrix=lcf_cdm_matrix,
left_lcf_matrix=left_lcf_cdm_matrix,
right_lcf_matrix=right_lcf_cdm_matrix)
sent_out = self.fusion_linear(torch.cat((global_context_features, cdw_sent_out, cdm_sent_out), -1))
sent_out = self.post_linear(sent_out)

else:
Expand Down
5 changes: 4 additions & 1 deletion release-note.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"1.15.6": {
"1": "Add classification report (including precision, recall, F1) display after training",
"2": "Add offline option to load huggingface model in inference: set get_xxx(offline=True) to auto detect and load local pretrained model",
"3": "Add confusion matrix display after training"
"3": "Add confusion matrix display after training",
"4": "Fix lcf-fusion in fast-lsa-t-v2",
"5": "Fix some typos",
"6": "Rename MOOC-En dataset to MOOC_En"
},
"1.15.5": {
"1": "Minor fixes of tad inference"
Expand Down

0 comments on commit 5d66637

Please sign in to comment.