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
874481f2
Commit
874481f2
authored
Apr 28, 2017
by
Michael Galkov
Committed by
Soumith Chintala
Apr 28, 2017
Browse files
Fix typo (#158)
parent
1f2c15f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/transforms.py
torchvision/transforms.py
+1
-1
No files found.
torchvision/transforms.py
View file @
874481f2
...
@@ -44,7 +44,7 @@ class ToTensor(object):
...
@@ -44,7 +44,7 @@ class ToTensor(object):
if
isinstance
(
pic
,
np
.
ndarray
):
if
isinstance
(
pic
,
np
.
ndarray
):
# handle numpy array
# handle numpy array
img
=
torch
.
from_numpy
(
pic
.
transpose
((
2
,
0
,
1
)))
img
=
torch
.
from_numpy
(
pic
.
transpose
((
2
,
0
,
1
)))
# backard compability
# back
w
ard compa
ti
bility
return
img
.
float
().
div
(
255
)
return
img
.
float
().
div
(
255
)
if
accimage
is
not
None
and
isinstance
(
pic
,
accimage
.
Image
):
if
accimage
is
not
None
and
isinstance
(
pic
,
accimage
.
Image
):
...
...
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