Skip to content

Commit 767ba05

Browse files
committed
Fix the calculation of acc_wvi for the training set
1 parent 0e1794f commit 767ba05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def train(train_loader, train_table, model, model_bert, opt, bert_config, tokeni
329329
acc_wn = cnt_wn / cnt
330330
acc_wc = cnt_wc / cnt
331331
acc_wo = cnt_wo / cnt
332-
acc_wvi = cnt_wv / cnt
332+
acc_wvi = cnt_wvi / cnt
333333
acc_wv = cnt_wv / cnt
334334
acc_lx = cnt_lx / cnt
335335
acc_x = cnt_x / cnt
@@ -640,5 +640,5 @@ def print_result(epoch, acc, dname):
640640

641641
state = {'model_bert': model_bert.state_dict()}
642642
torch.save(state, os.path.join('.', 'model_bert_best.pt'))
643-
643+
644644
print(f" Best Dev lx acc: {acc_lx_t_best} at epoch: {epoch_best}")

0 commit comments

Comments
 (0)