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
vision
Commits
bd8581a5
Commit
bd8581a5
authored
Sep 29, 2017
by
Yu-Yang Huang
Committed by
Francisco Massa
Sep 29, 2017
Browse files
Fix: img.shape to img.size in RandomSizedCrop (#277)
parent
10a387a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
torchvision/transforms.py
torchvision/transforms.py
+3
-3
No files found.
torchvision/transforms.py
View file @
bd8581a5
...
...
@@ -690,9 +690,9 @@ class RandomSizedCrop(object):
return
i
,
j
,
h
,
w
# Fallback
w
=
min
(
img
.
size
[
0
],
img
.
s
hap
e
[
1
])
i
=
(
img
.
s
hap
e
[
1
]
-
w
)
//
2
j
=
(
img
.
s
hap
e
[
0
]
-
w
)
//
2
w
=
min
(
img
.
size
[
0
],
img
.
s
iz
e
[
1
])
i
=
(
img
.
s
iz
e
[
1
]
-
w
)
//
2
j
=
(
img
.
s
iz
e
[
0
]
-
w
)
//
2
return
i
,
j
,
w
,
w
def
__call__
(
self
,
img
):
...
...
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