Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Jan 26, 2025
1 parent fe20693 commit 1ac1bad
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions nncf/common/composite_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,12 @@ def compression_stage(self) -> CompressionStage:
:return: The compression stage of the target model.
"""

result = CompressionStage.UNCOMPRESSED
for ctrl in self.child_ctrls:
if not self.child_ctrls:
return CompressionStage.UNCOMPRESSED
result = self.child_ctrls[0].compression_stage()
for ctrl in self.child_ctrls[1:]:
current_level = ctrl.compression_stage()
if result is None:
result = current_level
else:
result += current_level
result += current_level
return result

def load_state(self, state: Dict[str, Dict[str, Any]]) -> None:
Expand Down

0 comments on commit 1ac1bad

Please sign in to comment.