Coder Social home page Coder Social logo

nics_fix_pytorch's People

Contributors

a-suozhang avatar iltshade avatar walkerning avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nics_fix_pytorch's Issues

关于backward的问题

你好,请教一下,这边有看到对forward的处理主要是get_fix_forward函数里面,没有看到关于backward的相关的特殊处理,请问定点训练里面,这部分是怎么做的呢?有相关的文章吗?

Problem in parallel training

Currently, when doing parallel training across multiple GPUs (e.g. DataParallel), the fixed-point config for every module is unprotectedly shared by multiple threads of different GPUs. This will cause undefined behavior for activation_fix, and batch norm buffer update for running_mean and running_var, as different GPU is doing this according to different split of data, and concurrently write/read the config variables. (They also do not exist on the same devices...)

If the config is registered as buffer, this issue will be solved. @Gaffey

And, to keep the multi-gpu training as close as possible to single-gpu training, maybe [https://hangzhang.org/PyTorch-Encoding/nn.html#encoding.nn.SyncBatchNorm](synchronized batch norm) should be used, also synchronized quantization of activation should be used? (Weights can be quantized separately, as they are the same and not in-place updated on any gpus)

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.