Skip to content
Snippets Groups Projects
Commit d1cd450e authored by Neta Zmora's avatar Neta Zmora
Browse files

Activation statistics: change the APoZ sorting order

When ranking filters by APoZ, we need to change the sort order, to match
that of module.apoz_channels.value().  This is the result of the previous
bug fix.
parent 6fb0fed5
No related branches found
No related tags found
No related merge requests found
......@@ -206,8 +206,8 @@ class ActivationAPoZRankedFilterPruner(RankedFiltersParameterPruner):
msglogger.info("Too few filters - can't prune %.1f%% filters", 100*fraction_to_prune)
return
# Sort from high to low, and remove the bottom 'num_filters_to_prune' filters
filters_ordered_by_apoz = np.argsort(-apoz)[:-num_filters_to_prune]
# Sort from low to high, and remove the bottom 'num_filters_to_prune' filters
filters_ordered_by_apoz = np.argsort(apoz)[:-num_filters_to_prune]
zeros_mask_dict[param_name].mask = RankedFiltersParameterPruner.mask_from_filter_order(filters_ordered_by_apoz,
param, num_filters)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment