AI Model Efficiency Toolkit (AIMET) Forum

Error when performing channel pruning and spatial svd to efficientNet-b1

I’ m trying to perform channel pruning to efficientNet-b1 using example code from here, but recieved the follwing errors:

warnings:

  • WARNING:param.Dimension: Use method 'get_param_values' via param namespace 2021-11-25 08:11:20,977 - param.Dimension - WARNING - Use method 'get_param_values' via param namespace WARNING:param.ParameterizedMetaclass: Use method 'params' via param namespace 2021-11-25 08:11:21,263 - param.ParameterizedMetaclass - WARNING - Use method 'params' via param namespace WARNING:param.ParameterizedMetaclass: Use method 'params' via param namespace 2021-11-25 08:11:21,263 - param.ParameterizedMetaclass - WARNING - Use method 'params' via param namespace *

traceback:

  • Traceback (most recent call last): File "ChannelPruningEfficienNetb1.py", line 239, in <module> channel_pruning_auto_mode() File "ChannelPruningEfficienNetb1.py", line 180, in channel_pruning_auto_mode parameters=params) File "/home/tiansi/source/aimet/lib/python3.6/site-packages/aimet_torch/compress.py", line 113, in compress_model compressed_layer_db, stats = algo.compress_model(cost_metric, trainer) File "/home/tiansi/source/aimet/lib/python3.6/site-packages/aimet_common/compression_algo.py", line 87, in compress_model layer_comp_ratio_list, stats = self._comp_ratio_select_algo.select_per_layer_comp_ratios() File "/home/tiansi/source/aimet/lib/python3.6/site-packages/aimet_common/comp_ratio_select.py", line 232, in select_per_layer_comp_ratios current_min_score, current_max_score = self._find_min_max_eval_scores(updated_eval_scores_dict) File "/home/tiansi/source/aimet/lib/python3.6/site-packages/aimet_common/comp_ratio_select.py", line 352, in _find_min_max_eval_scores first_layer_scores = list(eval_scores_dict.values())[0] IndexError: list index out of range*

Additional information: I have follwed guides to make the model both onnx convertable and has no reused model( but still has some ops instead of nn.module ). To debug I tried to print in the evaluation callback function but recieved nothing and the sample code of spatial svd results the same traceback.

Is there anything I omited? Thanks for your help