Skip to content

net.zero_grad() #2

Description

@jason-engage

Hi, I'd like to try this in my u2net imagenet model.

Can i simply drop it in and replace Adam/SGD?

I noticed that you are calling net.zero_grad() in your training loop, however in my script its optimizer.zero_grad()... will this still work with AGD set as the optimizer?

Any other suggestions on getting it to work correctly? Thanks for putting another idea out there, Cheers

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions