diff --git a/paddleslim/auto_compression/compressor.py b/paddleslim/auto_compression/compressor.py index e86551c727303eaf3006619692027d179ac86f60..e098830ff01e33e10bdd6558efa4e22cb84610dc 100644 --- a/paddleslim/auto_compression/compressor.py +++ b/paddleslim/auto_compression/compressor.py @@ -769,7 +769,7 @@ class AutoCompression: train_program_info, test_program_info = self._prepare_program( inference_program, feed_target_names, fetch_targets, patterns, strategy, config, train_config) - if 'unstructure' in self._strategy: + if 'unstructure' in strategy: test_program_info.program._program = remove_unused_var_nodes( test_program_info.program._program) test_program_info = self._start_train(