Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

07 - Food Vision Big - Scikit-learn accuracy poor results #621

Open
Qlexio opened this issue Dec 30, 2023 Discussed in #620 · 0 comments
Open

07 - Food Vision Big - Scikit-learn accuracy poor results #621

Qlexio opened this issue Dec 30, 2023 Discussed in #620 · 0 comments

Comments

@Qlexio
Copy link

Qlexio commented Dec 30, 2023

Discussed in #620

Originally posted by Qlexio December 30, 2023
I have been facing poor results while using scikit-learn accuracy whereas tensorflow's evaluation was good.

Here is the initial code:

# unbatch test_data and extract labels
y_labels = []

for image, label in test_data.unbatch():
    y_labels.append(label.numpy().argmax())

y_labels[:10]

It returns a serie of 0s.

Fix

label variable is a unique integer. So, argmax of an integer always returns 0.

To fix this, drop the .argmax() fonction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant