Skip to content

Commit

Permalink
Merge pull request #13 from Dyke-F/main
Browse files Browse the repository at this point in the history
Update self_rewarding_lm_pytorch.py
  • Loading branch information
lucidrains authored Jan 30, 2024
2 parents 7ecb8a7 + 710d611 commit e09fccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion self_rewarding_lm_pytorch/self_rewarding_lm_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def forward(self):

loss = self.get_cross_entropy_loss(seq, prompt_len_or_mask)

total_valid_loss = loss.item() * batch
total_valid_loss += loss.item() * batch
total_batches += batch

valid_loss = total_valid_loss / total_batches
Expand Down

0 comments on commit e09fccf

Please sign in to comment.