Skip to content

mu_product in NAdam optimizer is never initialized #1154

Closed

Description

@shaltielshmid

The mu_product field in the NAdam state is never initialized and therefore defaults to zero. See here the initialization of the state (I also searched the rest of the code and there was no other initialization):
image

The mu_product by definition is always going to be the product of other multiplications, and therefore will always remain 0.

In the PyTorch documentation, you can see that in the source code for NAdam in the _init_group function they initialize the mu_product to 1:

image

Activity

  1. shaltielshmid commented on Nov 28, 2023

    @shaltielshmid
    ContributorAuthor

    Solved with #1155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions