juntang-zhuang / Adabelief-Optimizer

Repository for NeurIPS 2020 Spotlight "AdaBelief Optimizer: Adapting stepsizes by the belief in observed gradients"
BSD 2-Clause "Simplified" License
1.05k stars 109 forks source link

Suppressing weight decoupling and rectification messages #64

Open gunsodo opened 2 years ago

gunsodo commented 2 years ago

Is there a way to suppress these messages by setting some parameters explicitly when they are enabled?

Weight decoupling enabled in AdaBelief
Rectification enabled in AdaBelief

I skimmed through the code and did not notice there is any parameter that we do so. I apologize if I have overlooked any part of the code/documentation. Thank you in advance for your reply.

Environment

juntang-zhuang commented 2 years ago

Sorry, these two messages are not allowed to be disabled in the current implementation. Maybe you can consider putting the print function https://github.com/juntang-zhuang/Adabelief-Optimizer/blob/2855178eff6776762793f915ce2c615f776a1e4b/pypi_packages/adabelief_pytorch0.2.1/adabelief_pytorch/AdaBelief.py#L93 inside the if condition here and disabling it. https://github.com/juntang-zhuang/Adabelief-Optimizer/blob/2855178eff6776762793f915ce2c615f776a1e4b/pypi_packages/adabelief_pytorch0.2.1/adabelief_pytorch/AdaBelief.py#L47