Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ChakradharG authored Apr 23, 2024
1 parent 8a00e1a commit c6a9a8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test(model, dataloader, device):
labels = batch['labels']

with torch.inference_mode():
logits = model(inputs, attention_mask).squeeze()
logits = model(inputs, attention_mask).squeeze(1)

preds = torch.where(logits > 0.5, 1, 0)
predictions.extend(preds.cpu().tolist())
Expand Down

0 comments on commit c6a9a8c

Please sign in to comment.