GithubHelp home page GithubHelp logo

Comments (3)

GokulEpiphany avatar GokulEpiphany commented on September 28, 2024

It does support multi GPUs. If you have Apex installed, DistributedDataParallel from https://nvidia.github.io/apex/parallel.html is used. Else, torch DistributedDataParallel is used. In case of multi GPU setup, I think loss is the summation of n batches being executed parallelly, that might explain 0.98 loss(which is ~0.45*2) assuming you are training on 2 GPUs. This is my understanding of the codebase, I might be wrong. Could you confirm if you are using 2 GPUs? (https://github.com/rwightman/efficientdet-pytorch/blob/master/train.py#L298) -> assumption wrong, see comment below

from efficientdet-pytorch.

rwightman avatar rwightman commented on September 28, 2024

@lognat0704 I have not tested the train bench with DataParallel so a reasonable chance it doesn't work. The reason DataParallel isn't in my train code is that it is slower than DistributedDataParallel. For models like this that take a loong time to train, DDP + SyncBN seems the best approach. In my opinion not worth spending time to fix the slower solution. I do support DP in the validation / predict bench because it's easier to get the completely correct val result (no extra padding for the last batch).

The loss is a mean, reduced mean across the multiple processes, so it should be the same regardless of mode, if it's 2x there is something wrong. Do keep in mind, you want to scale your LR with the effective batch size, so if you double the effective batch size by doubling the GPUs active, you want to double the LR.

from efficientdet-pytorch.

glenn-jocher avatar glenn-jocher commented on September 28, 2024

@rwightman we also use torch DDP (have not tried the apex version) for training and DP for val/testing in our yolo repos. We recently had a user claim significant multi gpu performance improvements over torch DDP by using mp spawn for training, though I have not had time to try to verify myself.

from efficientdet-pytorch.

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.