You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
y_preds.squeeze()
tensor([True, True, True, True, True], device='cuda:0')
tensor([0., 0., 1., 0., 1.], device='cuda:0') **Why are the last two rows like this? They are all **True**, but the labels are0, 0, 1, 0, 1`.**
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
`y_pred_probs = torch.sigmoid(y_logits)
y_pred_probs
tensor([[0.4916],
[0.4923],
[0.5223],
[0.4827],
[0.5736]], device='cuda:0')`
`torch.round(y_pred_probs)
tensor([[0.],
[0.],
[1.],
[0.],
[1.]], device='cuda:0')`
`# Find the predicted labels
y_preds = torch.round(y_pred_probs)
In full (logits -> pred probs -> pred labels)
y_pred_labels = torch.round(torch.sigmoid(model_0(X_test.to(device))[:5]))
Check for equality
print(torch.eq(y_preds.squeeze(), y_pred_labels.squeeze()))
Get rid of extra dimension
y_preds.squeeze()
tensor([True, True, True, True, True], device='cuda:0')
tensor([0., 0., 1., 0., 1.], device='cuda:0')
**Why are the last two rows like this? They are all **True**, but the labels are
0, 0, 1, 0, 1`.**Beta Was this translation helpful? Give feedback.
All reactions