Skip to content

Commit

Permalink
YOLOV8 Fix modify arch for quantization call (#1686)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavnmagic committed Jul 25, 2023
1 parent 09c9c96 commit ab16210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sparseml/yolov8/trainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _build_managers(self, ckpt: Optional[dict]):
)
self.checkpoint_manager = ScheduledModifierManager.from_yaml(ckpt["recipe"])
if self.checkpoint_manager.quantization_modifiers:
self._modify_arch_for_quantization()
_modify_arch_for_quantization(self.model)
self.checkpoint_manager.apply_structure(self.model, epoch=float("inf"))

else:
Expand All @@ -245,7 +245,7 @@ def _build_managers(self, ckpt: Optional[dict]):
f"at epoch {ckpt['epoch']}"
)
if self.manager.quantization_modifiers:
self._modify_arch_for_quantization()
_modify_arch_for_quantization(self.model)
self.manager.apply_structure(self.model, epoch=ckpt["epoch"])

def resume_training(self, ckpt):
Expand Down

0 comments on commit ab16210

Please sign in to comment.