Skip to content

Syntax error in diffgrad.py. #3

@Phylake1337

Description

@Phylake1337

Hello Mr.Shivram.
Firstly, I want to thank you for the great work.
I was trying to use the optimizer in diffgrad.py, but there's a syntax error line 100.
state['previous_grad'] = grad %used in paper but has the bug that previous grad is overwritten with grad and diff becomes always zero. Fixed in the next line.
it should be.
state['previous_grad'] = grad #used in the paper but has the bug that the previous grad is overwritten with grad and diff becomes always zero. Fixed in the next line.
it seems you are coding in c++ much more than python :D.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions