Code Monkey home page Code Monkey logo

Comments (5)

davda54 avatar davda54 commented on July 17, 2024

Hi, I believe that's the right way of doing gradient accumulation. Indeed, it is a bit cumbersome, but I can't think of a more elegant way to do it. Is it working for you?

from sam.

bobo0810 avatar bobo0810 commented on July 17, 2024

Hi, I believe that's the right way of doing gradient accumulation. Indeed, it is a bit cumbersome, but I can't think of a more elegant way to do it. Is it working for you?

Thank you for your reply. I'm sorry I haven't started the experiment yet. If I finish the experiment, I will post it as soon as possible.

from sam.

bobo0810 avatar bobo0810 commented on July 17, 2024

@davda54 Hi, I did a toy experiment with 10,000 categories. Under the same parameters, SAM performs better than SGD!

By the way, is it possible to use the SAM optimizer together with Pytorch AMP? and are there any special usages?Thanks again for your work~

from sam.

davda54 avatar davda54 commented on July 17, 2024

Awasome! :) To be honest, I have no experience with AMP, but I don't see any major issues in its combination with SAM.

from sam.

ODD2 avatar ODD2 commented on July 17, 2024

Hi @davda54 , I saw a recent discussion about gradient accumulation with the SAM optimizer and got a bit confused, so would like to make sure if the current SAM is still adaptable with the gradient accumulation method?

from sam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.