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

Commit

Permalink
updates (#2235)
Browse files Browse the repository at this point in the history
  • Loading branch information
chicm-ms authored Mar 25, 2020
1 parent c2e4901 commit cb7d253
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit cb7d253

Please sign in to comment.