Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

updates #2235

Merged
merged 1 commit into from
Mar 25, 2020
Merged

updates #2235

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/model_compress/model_prune_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
'pruner_class': L1FilterPruner,
'config_list': [{
'sparsity': 0.5,
'op_types': ['default'],
'op_types': ['Conv2d'],
'op_names': ['feature.0', 'feature.24', 'feature.27', 'feature.30', 'feature.34', 'feature.37']
}]
},
Expand All @@ -69,7 +69,7 @@
'pruner_class': ActivationMeanRankFilterPruner,
'config_list': [{
'sparsity': 0.5,
'op_types': ['default'],
'op_types': ['Conv2d'],
'op_names': ['feature.0', 'feature.24', 'feature.27', 'feature.30', 'feature.34', 'feature.37']
}]
},
Expand Down
4 changes: 2 additions & 2 deletions test/nni_test/nnitest/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def check_metrics(self, nni_source_dir, **kwargs):
assert len(trial_final_result) == 1, 'there should be 1 final result'
assert trial_final_result[0] == expected_metrics['final_result']
# encode dict/number into json string to compare them in set
assert set([json.dumps(x) for x in trial_intermediate_result]) \
== set([json.dumps(x) for x in expected_metrics['intermediate_result']])
assert set([json.dumps(x, sort_keys=True) for x in trial_intermediate_result]) \
== set([json.dumps(x, sort_keys=True) for x in expected_metrics['intermediate_result']])

def get_metric_results(self, metrics):
intermediate_result = {}
Expand Down