We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7811dd2 commit e8cfb9bCopy full SHA for e8cfb9b
pytorch_optimizer/optimizer/prodigy.py
@@ -110,6 +110,8 @@ def step(self, closure: CLOSURE = None) -> LOSS:
110
111
if 'd_numerator' not in group:
112
group['d_numerator'] = torch.tensor([0.0], device=device)
113
+ elif group['d_numerator'].device != device:
114
+ group['d_numerator'] = group['d_numerator'].to(device)
115
116
d_numerator = group['d_numerator']
117
d_numerator.mul_(beta3)
0 commit comments