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
5ade35f4
Unverified
Commit
5ade35f4
authored
Aug 13, 2020
by
Wenwei Zhang
Committed by
GitHub
Aug 13, 2020
Browse files
use elif rather than if (#491)
parent
4cc48073
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mmcv/runner/hooks/sampler_seed.py
mmcv/runner/hooks/sampler_seed.py
+2
-2
No files found.
mmcv/runner/hooks/sampler_seed.py
View file @
5ade35f4
...
@@ -9,6 +9,6 @@ class DistSamplerSeedHook(Hook):
...
@@ -9,6 +9,6 @@ class DistSamplerSeedHook(Hook):
if
hasattr
(
runner
.
data_loader
.
sampler
,
'set_epoch'
):
if
hasattr
(
runner
.
data_loader
.
sampler
,
'set_epoch'
):
# in case the data loader uses `SequentialSampler` in Pytorch
# in case the data loader uses `SequentialSampler` in Pytorch
runner
.
data_loader
.
sampler
.
set_epoch
(
runner
.
epoch
)
runner
.
data_loader
.
sampler
.
set_epoch
(
runner
.
epoch
)
if
hasattr
(
runner
.
data_loader
.
batch_sampler
.
sampler
,
'set_epoch'
):
el
if
hasattr
(
runner
.
data_loader
.
batch_sampler
.
sampler
,
'set_epoch'
):
# batch sampler in pytorch warps
a
sampler as its attributes.
# batch sampler in pytorch warps
the
sampler as its attributes.
runner
.
data_loader
.
batch_sampler
.
sampler
.
set_epoch
(
runner
.
epoch
)
runner
.
data_loader
.
batch_sampler
.
sampler
.
set_epoch
(
runner
.
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