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
01b0a004
"vscode:/vscode.git/clone" did not exist on "69caa9647201b08119288ab1df6574552635b37e"
Unverified
Commit
01b0a004
authored
Apr 26, 2022
by
Philip Meier
Committed by
GitHub
Apr 26, 2022
Browse files
remove magic comma in some places (#5880)
parent
66ed6937
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
24 deletions
+3
-24
test/test_functional_tensor.py
test/test_functional_tensor.py
+2
-18
torchvision/transforms/functional_tensor.py
torchvision/transforms/functional_tensor.py
+1
-6
No files found.
test/test_functional_tensor.py
View file @
01b0a004
...
...
@@ -1030,25 +1030,9 @@ def test_resized_crop(device, mode):
(
F_t
.
adjust_contrast
,
(
1.0
,)),
(
F_t
.
adjust_hue
,
(
-
0.5
,)),
(
F_t
.
adjust_saturation
,
(
2.0
,)),
(
F_t
.
pad
,
(
[
2
,
],
2
,
"constant"
,
),
),
(
F_t
.
pad
,
([
2
],
2
,
"constant"
)),
(
F_t
.
resize
,
([
10
,
11
],)),
(
F_t
.
perspective
,
(
[
0.2
,
]
),
),
(
F_t
.
perspective
,
([
0.2
])),
(
F_t
.
gaussian_blur
,
((
2
,
2
),
(
0.7
,
0.5
))),
(
F_t
.
invert
,
()),
(
F_t
.
posterize
,
(
0
,)),
...
...
torchvision/transforms/functional_tensor.py
View file @
01b0a004
...
...
@@ -570,12 +570,7 @@ def _cast_squeeze_out(img: Tensor, need_cast: bool, need_squeeze: bool, out_dtyp
def
_apply_grid_transform
(
img
:
Tensor
,
grid
:
Tensor
,
mode
:
str
,
fill
:
Optional
[
List
[
float
]])
->
Tensor
:
img
,
need_cast
,
need_squeeze
,
out_dtype
=
_cast_squeeze_in
(
img
,
[
grid
.
dtype
,
],
)
img
,
need_cast
,
need_squeeze
,
out_dtype
=
_cast_squeeze_in
(
img
,
[
grid
.
dtype
])
if
img
.
shape
[
0
]
>
1
:
# Apply same grid to a batch of images
...
...
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