mirror of
https://github.com/open-mmlab/mmfewshot.git
synced 2025-06-03 14:49:43 +08:00
update comments
This commit is contained in:
parent
1b010767c5
commit
d3932161fa
@ -10,9 +10,9 @@ def check_dist_init():
|
||||
|
||||
|
||||
def sync_random_seed(seed=None, device='cuda'):
|
||||
"""Make sure different ranks share the same seed.
|
||||
"""Propagating the seed of rank 0 to all other ranks.
|
||||
|
||||
All workers must call
|
||||
Make sure different ranks share the same seed. All workers must call
|
||||
this function, otherwise it will deadlock. This method is generally used in
|
||||
`DistributedSampler`, because the seed should be identical across all
|
||||
processes in the distributed group.
|
||||
|
Loading…
x
Reference in New Issue
Block a user