Comments (3)
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.
@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.
@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)
- [BUG] Significant difference between Windows and Ubuntu validate.py result HOT 3
- 'NestedTensor' object has no attribute 'size' HOT 3
- CocoEvaluator fails when two training jobs are run at the same time
- TypeError: 'FeatureInfo' object is not callable HOT 1
- [BUG] Issue title...Results do not correspond to current coco set HOT 1
- [BUG] pip can't find the package on Kaggle & Colab HOT 2
- [BUG] "nan" Training loss in beginning of the training HOT 1
- PyTorch 1.12 HOT 4
- Problem with create model from pretrained checkpoint
- Maybe buf fix
- [BUG] Cannot save torchscripted model
- [BUG] Can't use different image size than what's specified in the config HOT 5
- [BUG] UserWarning: __floordiv__ is deprecated HOT 1
- Inference code
- A new release? HOT 2
- [BUG] Float16 Training Stability Fix
- Tried all the way. It sucks.
- [FEATURE] Freezing Layers HOT 1
- [BUG] Stack shapes mismatch with non-square images HOT 7
- Can't use Pytorch backward hooks because of inplace ReLU6 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efficientdet-pytorch.