Commit 58b6db5
committed
fix: use dynamic label names for inference to match training dataset
Previously, the inference section used a hardcoded list of labels:
['no', 'yes', 'down', 'go', 'left', 'up', 'right', 'stop'],
which may not match the order of class names in `train_ds.class_names`.
This could lead to incorrect labeling in prediction visualizations.
This commit replaces the hardcoded labels with `label_names` from the training
dataset to ensure the model's outputs are correctly mapped to their respective labels.1 parent 0e030eb commit 58b6db5
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | | - | |
| 828 | + | |
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
| |||
0 commit comments