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
c8c34938
Unverified
Commit
c8c34938
authored
Feb 12, 2019
by
Kai Chen
Committed by
GitHub
Feb 12, 2019
Browse files
Merge pull request #33 from OneDirection9/master
bug fixes
parents
8a3e232c
2882ef12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mmcv/parallel/collate.py
mmcv/parallel/collate.py
+1
-1
No files found.
mmcv/parallel/collate.py
View file @
c8c34938
...
@@ -36,7 +36,7 @@ def collate(batch, samples_per_gpu=1):
...
@@ -36,7 +36,7 @@ def collate(batch, samples_per_gpu=1):
assert
isinstance
(
batch
[
i
].
data
,
torch
.
Tensor
)
assert
isinstance
(
batch
[
i
].
data
,
torch
.
Tensor
)
# TODO: handle tensors other than 3d
# TODO: handle tensors other than 3d
assert
batch
[
i
].
dim
()
==
3
assert
batch
[
i
].
dim
()
==
3
c
,
h
,
w
=
batch
[
0
].
size
()
c
,
h
,
w
=
batch
[
i
].
size
()
for
sample
in
batch
[
i
:
i
+
samples_per_gpu
]:
for
sample
in
batch
[
i
:
i
+
samples_per_gpu
]:
assert
c
==
sample
.
size
(
0
)
assert
c
==
sample
.
size
(
0
)
h
=
max
(
h
,
sample
.
size
(
1
))
h
=
max
(
h
,
sample
.
size
(
1
))
...
...
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