Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
maskrcnn
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
人工智能
maskrcnn
Commits
fd204722
Unverified
Commit
fd204722
authored
Mar 07, 2019
by
Francisco Massa
Committed by
GitHub
Mar 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ImageList to work with 3d tensors (#543)
parent
de42d895
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
image_list.py
maskrcnn_benchmark/structures/image_list.py
+2
-0
No files found.
maskrcnn_benchmark/structures/image_list.py
View file @
fd204722
...
...
@@ -41,6 +41,8 @@ def to_image_list(tensors, size_divisible=0):
return
tensors
elif
isinstance
(
tensors
,
torch
.
Tensor
):
# single tensor shape can be inferred
if
tensors
.
dim
()
==
3
:
tensors
=
tensors
[
None
]
assert
tensors
.
dim
()
==
4
image_sizes
=
[
tensor
.
shape
[
-
2
:]
for
tensor
in
tensors
]
return
ImageList
(
tensors
,
image_sizes
)
...
...
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