Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
ba30d98a
"tests/vscode:/vscode.git/clone" did not exist on "dc85b578c26c1dee06df4015e446eec222296bc7"
Unverified
Commit
ba30d98a
authored
Feb 24, 2021
by
Miao Zheng
Committed by
GitHub
Feb 24, 2021
Browse files
Add docstring for DistSamplerSeedHook (#850)
parent
823b62ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
mmcv/runner/hooks/sampler_seed.py
mmcv/runner/hooks/sampler_seed.py
+6
-0
No files found.
mmcv/runner/hooks/sampler_seed.py
View file @
ba30d98a
...
...
@@ -4,6 +4,12 @@ from .hook import HOOKS, Hook
@
HOOKS
.
register_module
()
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
):
if
hasattr
(
runner
.
data_loader
.
sampler
,
'set_epoch'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment