diff --git a/examples/auto_compression/amc/environment.py b/examples/auto_compression/amc/environment.py index af6a5e76b1cf0e5c62d908d625d532ecc9a1bcf3..01dfd0b62403daa5a1051d30d44ac5e068f5b77d 100755 --- a/examples/auto_compression/amc/environment.py +++ b/examples/auto_compression/amc/environment.py @@ -329,6 +329,7 @@ class DistillerWrapperEnvironment(gym.Env): distiller.assign_layer_fq_names(model) modules_list = [mod.distiller_name for mod in model.modules() if type(mod)==torch.nn.Conv2d] msglogger.warning("Using the following layers: %s" % ", ".join(modules_list)) + raise ValueError("The config file does not specify the modules to compress for %s" % app_args.arch) self.net_wrapper = NetworkWrapper(model, app_args, services, modules_list, amc_cfg.pruning_pattern) self.original_model_macs, self.original_model_size = self.net_wrapper.get_resources_requirements()