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.
Discussed in https://github.com/mrdbourke/tensorflow-deep-learning/discussions/620