03_computer_vision_exercise #932
Unanswered
AhmedYusri54
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.
-
Hello can you guys help me on this
test_preds = [] model_2.eval() with torch.inference_mode(): for X_test, y_test in tqdm(fashion_mnist_train_dataloader): y_logits = model_2(X_test.to(device)) y_pred = torch.softmax(y_logits, dim=1) y_labels = torch.argmax(y_pred, dim=1) test_preds.append(y_labels) test_preds = torch.cat(test_preds).cpu() test_preds[:10], len(test_preds)
when i run this the output be like this
(tensor([3, 4, 9, 0, 8, 3, 9, 6, 8, 7]), 60000)
but it must be like this
(tensor([9, 2, 1, 1, 6, 1, 4, 6, 5, 7]), 10000)
so what is the error in my code ?
Beta Was this translation helpful? Give feedback.
All reactions