Bag in 02_pytorch_classification #1220
Unanswered
simpletaril
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
my code section:
y_preds = torch.round(y_pred_probs)
y_preds_labels = torch.round(torch.sigmoid(model_0(x_test.to(device))))
print(torch.eq(y_preds.squeeze(), y_preds_labels.squeeze()))
y_preds.squeeze()
error:
AttributeError Traceback (most recent call last)
/tmp/ipython-input-29-4269741000.py in <cell line: 0>()
2 y_preds = torch.round(y_pred_probs)
3
----> 4 y_preds_labels = torch.round(torch.sigmoid(model_0(x_test.to(device))))
5
6 print(torch.eq(y_preds.squeeze(), y_preds_labels.squeeze()))
AttributeError: 'numpy.ndarray' object has no attribute 'to'
Beta Was this translation helpful? Give feedback.
All reactions