Giter VIP home page Giter VIP logo

dowg's Introduction

This is an implementation of the DoWG optimization algorithm as laid out by Khaled et al.. I am unsure if the implementation is correct, and I took the liberty of creating a quantized implementation under DoWG8bit as the ordinary version absolutely gobbles up Vram.

Pull requests are welcome.

dowg's People

Contributors

amorporkian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dowg's Issues

Suggestion for NaN issue

DoWG/dowg.py

Line 41 in 1c72e4c

eta_t = r_t.pow(2) / torch.sqrt(v_t)

Division by zero can still happen with near zero values, you can either explicitly check if sqrt(v_t) is zero or add a small constant to divisor.

eta_t = r_t.pow(2) / (torch.sqrt(v_t) + 3e-8)

exact constant up to you, I picked 3e-8 because numpy.sqrt(numpy.float16(2e-8)) == 0

May not fix your problem, but couldn't hurt.

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.