Commit 42ac339f authored by Francisc Bungiu's avatar Francisc Bungiu Committed by Facebook GitHub Bot
Browse files

Use parallel version of SGD optimizer

Summary:
X-link: https://github.com/facebookresearch/detectron2/pull/4633

Pull Request resolved: https://github.com/facebookresearch/d2go/pull/406

Profiling yielded the training could benefit from using the parallel version of the SGD optimizer.
Passing `foreach=True` to enable.

Reviewed By: tglik

Differential Revision: D40798214

fbshipit-source-id: aa098d1fbbece0862bc9343df761765b0c3b15da
parent 01c351bc
......@@ -251,6 +251,7 @@ def sgd(cfg, model: torch.nn.Module) -> torch.optim.Optimizer:
cfg.SOLVER.BASE_LR,
momentum=cfg.SOLVER.MOMENTUM,
nesterov=cfg.SOLVER.NESTEROV,
foreach=True,
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment