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
da61ff8c
Unverified
Commit
da61ff8c
authored
Jan 20, 2021
by
Vasilis Vryniotis
Committed by
GitHub
Jan 20, 2021
Browse files
Replace with explicit check on image. (#3239)
Co-authored-by:
Francisco Massa
<
fvsmassa@gmail.com
>
parent
ae0d80b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
torchvision/transforms/functional_tensor.py
torchvision/transforms/functional_tensor.py
+1
-2
No files found.
torchvision/transforms/functional_tensor.py
View file @
da61ff8c
...
...
@@ -59,8 +59,7 @@ def convert_image_dtype(image: torch.Tensor, dtype: torch.dtype = torch.float) -
if
image
.
dtype
==
dtype
:
return
image
# TODO: replace with image.dtype.is_floating_point when torchscript supports it
if
torch
.
empty
(
0
,
dtype
=
image
.
dtype
).
is_floating_point
():
if
image
.
is_floating_point
():
# TODO: replace with dtype.is_floating_point when torchscript supports it
if
torch
.
tensor
(
0
,
dtype
=
dtype
).
is_floating_point
():
...
...
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