-
Notifications
You must be signed in to change notification settings - Fork 185
Open
Description
There is a bug here causing predicted labels to be printed in incorrect order. Traversing a java.util.PriorityQueue with a range-based for loop does not guarantee traversal in sorted order. Fixed by converting PQ to array, sorting array with PQ.comparator(), and returning the results in sorted order.
More information on the undefined behavior of traversing PQ here.
I just put in a pull request to fix this issue in the similar Codelabs TF image classifier repo. The same fix to TensorFlowHelper.java will work here.
Metadata
Metadata
Assignees
Labels
No labels