Browse Source

made confidence less than threshold_cross_entropy

Signed-off-by: lipb <pingbao.li@glasssix.com>
tags/v0.3.0
lipb 4 years ago
parent
commit
fe54975c43
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/sedna/hard_example_mining/image_classification/hard_mine_filters.py

+ 1
- 1
lib/sedna/hard_example_mining/image_classification/hard_mine_filters.py View File

@@ -60,7 +60,7 @@ class CrossEntropyFilter(BaseFilter):
log_sum += class_data * math.log(class_data) log_sum += class_data * math.log(class_data)
confidence_score = 1 + 1.0 * log_sum / math.log( confidence_score = 1 + 1.0 * log_sum / math.log(
len(infer_result)) len(infer_result))
return confidence_score >= self.threshold_cross_entropy
return confidence_score < self.threshold_cross_entropy
else: else:
logger.warning("every value of infer_result should be in " logger.warning("every value of infer_result should be in "
f"[0,1], your data is {infer_result}") f"[0,1], your data is {infer_result}")


Loading…
Cancel
Save