Skip to content

Commit

Permalink
Update pretrain_bert.py (#355)
Browse files Browse the repository at this point in the history
fix a bug that cause
File "pretrain_bert.py", line 91, in loss_func
    lm_loss_, sop_logits = output_tensor
    ^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)
  • Loading branch information
lzzmm authored Feb 27, 2024
1 parent 31e2584 commit a9856ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pretrain_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def data_post_process(data, data_sampler_state_dict):
return data

def loss_func(loss_mask, sentence_order, output_tensor):
lm_loss_, sop_logits = output_tensor
lm_loss_, sop_logits, _ = output_tensor

lm_loss_ = lm_loss_.float()
loss_mask = loss_mask.float()
Expand Down

0 comments on commit a9856ce

Please sign in to comment.