sail-sg / Adan

Adan: Adaptive Nesterov Momentum Algorithm for Faster Optimizing Deep Models
Apache License 2.0
756 stars 64 forks source link

valueError: not enough values to unpack (expected 3, got 2) #19

Closed myseverus closed 1 year ago

myseverus commented 1 year ago

Hello! Thank you for your work. Now I have a problem. I don't know how to solve it Traceback (most recent call last): File "/home/anaconda/envs/main/Lib/python5.8/site-packages/tonch/optim/optimizer.py" line 113,in wrapperreturn func(*args,*kwargs) File "/home/anaconda/envs/ main/Lit/python3.8/site-packages/torch/autogpad/gnad_mode.py",line 27,in decorate_contextreturn func(args,**kwargs) File "/home/main/adan.py", line 121,in step beta1, beta2, beta3 = group [ ' betas '] valueError: not enough values to unpack (expected 3, got 2)

myseverus commented 1 year ago

Inheriting Optimizer class seems to have only two values,betas=(0.98, 0.92, 0.99),It didn't seem to work

XingyuXie commented 1 year ago

Hi, @myseverus Thanks for trying Adan. It seems that the problem has nothing to do with the Optimizer class. I guess the number of beta parameters passed in by your train.py cannot exceed 2.