Browse Source

Merge pull request #88 from Learnware-LAMDA/mnt_image_score

[MNT] Improve Scoring Function for Image Learnware
tags/v0.3.2
Gene GitHub 2 years ago
parent
commit
b495bd1484
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      learnware/market/easy/searcher.py

+ 6
- 0
learnware/market/easy/searcher.py View File

@@ -586,6 +586,12 @@ class EasyStatSearcher(BaseSearcher):
weight_list = []
mixture_learnware_list = []

# Special Transform for ImageSpecification
if self.stat_spec_type == "RKMEImageSpecification":
sorted_dist_list = [np.exp(-d / 0.00005) for d in sorted_dist_list]
if mixture_dist is not None:
mixture_dist = np.exp(-mixture_dist / 0.00005)

if mixture_dist is None:
sorted_score_list = self._convert_dist_to_score(sorted_dist_list)
mixture_score = None


Loading…
Cancel
Save