diff --git a/networks/attentive_nas_dynamic_model.py b/networks/attentive_nas_dynamic_model.py index 7628f33..3f7bbc7 100644 --- a/networks/attentive_nas_dynamic_model.py +++ b/networks/attentive_nas_dynamic_model.py @@ -264,8 +264,7 @@ def module_str(self): for stage_id, block_idx in enumerate(self.block_group_info): depth = self.runtime_depth[stage_id] active_idx = block_idx[:depth] - for idx in active_idx: - _str += self.blocks[idx].module_str + '\n' + _str = '\n'.join([self.blocks[idx].module_str for idx in active_idx]) if not self.use_v3_head: _str += self.last_conv.module_str + '\n' else: diff --git a/networks/attentive_nas_static_model.py b/networks/attentive_nas_static_model.py index 0728322..4b71dd9 100644 --- a/networks/attentive_nas_static_model.py +++ b/networks/attentive_nas_static_model.py @@ -32,8 +32,7 @@ def forward(self, x): @property def module_str(self): _str = self.first_conv.module_str + '\n' - for block in self.blocks: - _str += block.module_str + '\n' + _str = '\n'.join([block.module_str for block in self.blocks]) #_str += self.last_conv.module_str + '\n' _str += self.classifier.module_str return _str