Skip to content

Commit 7962268

Browse files
committed
debug Adam.
1 parent 4d8aade commit 7962268

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qtorch/optim/optim_low.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def step(self, closure=None):
9494
# quantize momentum
9595
if not self.momentum_quant is None:
9696
for group in self.param_groups:
97-
if group['momentum'] == 0: continue
97+
if isinstance(self.optim, SGD) and group['momentum'] == 0: continue
9898
for p in group['params']:
9999
param_state = self.optim.state[p]
100100
for key in self.momentum_keys:

0 commit comments

Comments
 (0)