We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d61790b commit 97a5555Copy full SHA for 97a5555
ppq/quantization/algorithm/training.py
@@ -1,6 +1,4 @@
1
# TODO move training logic to here.
2
-from __future__ import annotations
3
-
4
import random
5
from math import sqrt
6
from random import randint
@@ -650,7 +648,7 @@ def __init__(self,
650
648
self._masters = []
651
649
652
@ property
653
- def masters(self) -> List[StraightThroughEstimateDelegator]:
+ def masters(self):
654
return self._masters
655
656
@ masters.setter
@@ -675,6 +673,7 @@ def finalize(self) -> None:
675
673
# bias
676
674
scale = self.scale_multiplier
677
for delegator in self.masters:
+ assert isinstance(delegator, StraightThroughEstimateDelegator)
678
scale = scale * delegator.scale.data.abs()
679
self.config.scale = scale
680
0 commit comments