We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38b93fb commit 56ae103Copy full SHA for 56ae103
tensorflow_lite_support/cc/task/core/category.h
@@ -15,7 +15,8 @@ limitations under the License.
15
16
#ifndef TENSORFLOW_LITE_SUPPORT_CC_TASK_CORE_CATEGORY_H_
17
#define TENSORFLOW_LITE_SUPPORT_CC_TASK_CORE_CATEGORY_H_
18
-#include <cstdlib>
+
19
+#include <cmath>
20
#include <string>
21
22
namespace tflite {
@@ -32,7 +33,7 @@ struct Category {
32
33
friend bool operator==(const Category& lhs, const Category& rhs) {
34
constexpr const double kScoreTolerance = 1e-6;
35
return lhs.class_name == rhs.class_name &&
- abs(lhs.score - rhs.score) <= kScoreTolerance;
36
+ abs((double)(lhs.score - rhs.score)) <= kScoreTolerance;
37
}
38
39
friend bool operator!=(const Category& lhs, const Category& rhs) {
0 commit comments