Unverified Commit ba30d98a authored by Miao Zheng's avatar Miao Zheng Committed by GitHub
Browse files

Add docstring for DistSamplerSeedHook (#850)

parent 823b62ed
...@@ -4,6 +4,12 @@ from .hook import HOOKS, Hook ...@@ -4,6 +4,12 @@ from .hook import HOOKS, Hook
@HOOKS.register_module() @HOOKS.register_module()
class DistSamplerSeedHook(Hook): class DistSamplerSeedHook(Hook):
"""Data-loading sampler for distributed training.
When distributed training, it is only useful in conjunction with
:obj:`EpochBasedRunner`, while :obj:`IterBasedRunner` achieves the same
purpose with :obj:`IterLoader`.
"""
def before_epoch(self, runner): def before_epoch(self, runner):
if hasattr(runner.data_loader.sampler, 'set_epoch'): if hasattr(runner.data_loader.sampler, 'set_epoch'):
......
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