Commit 21a331fb authored by Rick Ho's avatar Rick Ho
Browse files

add a hint for DGDP synchronization

parent 527e66af
...@@ -78,6 +78,12 @@ class DistributedGroupedDataParallel(nn.Module): ...@@ -78,6 +78,12 @@ class DistributedGroupedDataParallel(nn.Module):
self._sync_params() self._sync_params()
def _sync_params(self): def _sync_params(self):
r"""
Note that this module does not guarantee initial consistency of
parameters. Users are supposed to manually initalize the model on
different workers with the same parameters using either this function
or other methods like pre-defined random seeds.
"""
groups = dict() groups = dict()
for p in self.module.parameters(): for p in self.module.parameters():
if not p.requires_grad or p.grad is None: if not p.requires_grad or p.grad is None:
......
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