Skip to content

Commit

Permalink
Bug Fix for bert to run on entire validation dataset (#5493)
Browse files Browse the repository at this point in the history
Signed-off-by: Shanmugam Ramasamy <[email protected]>

Signed-off-by: Shanmugam Ramasamy <[email protected]>
  • Loading branch information
shanmugamr1992 authored Nov 23, 2022
1 parent da953ae commit b86bba8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def validation_step(self, batch, batch_idx):
loss_sum = (
torch.vstack(loss_sum_tensors_list).sum(axis=0)
if len(loss_sum_tensors_list) > 0
else torch.tensor(0.0)
else torch.tensor([0.0, 0.0]).cuda()
)
return loss_sum
else:
Expand Down

0 comments on commit b86bba8

Please sign in to comment.