Skip to content

Commit

Permalink
Update my_tod_pretraining.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwu0731 authored Oct 27, 2020
1 parent 9de13bb commit 85e910a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions my_tod_pretraining.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ def train(args, trn_loader, dev_loader, model, tokenizer, cand_uttr_sys_dict, ot
## Calculate RCL loss
scores = torch.matmul(hid_cont, hid_resp.transpose(1, 0))
loss_rs = xeloss(scores, resp_label)
loss_rs = loss_rs.item()
loss += loss_rs
loss_rs = loss_rs.item()

## with only MLM loss
else:
Expand Down Expand Up @@ -1007,4 +1007,4 @@ def main():


if __name__ == "__main__":
main()
main()

0 comments on commit 85e910a

Please sign in to comment.