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
c3e92565
"docs/source/tutorials/activation_checkpointing.rst" did not exist on "29aae007fffa965c3bcbae7692f1e3d4f301cff8"
Unverified
Commit
c3e92565
authored
Jul 03, 2023
by
Philip Meier
Committed by
GitHub
Jul 03, 2023
Browse files
fix PIL version check (#7716)
parent
43030cb2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
+0
-27
test/test_transforms.py
test/test_transforms.py
+0
-27
No files found.
test/test_transforms.py
View file @
c3e92565
...
...
@@ -952,33 +952,6 @@ def test_adjust_contrast():
torch
.
testing
.
assert_close
(
y_np
,
y_ans
)
@
pytest
.
mark
.
skipif
(
Image
.
__version__
>=
"7"
,
reason
=
"Temporarily disabled"
)
def
test_adjust_saturation
():
x_shape
=
[
2
,
2
,
3
]
x_data
=
[
0
,
5
,
13
,
54
,
135
,
226
,
37
,
8
,
234
,
90
,
255
,
1
]
x_np
=
np
.
array
(
x_data
,
dtype
=
np
.
uint8
).
reshape
(
x_shape
)
x_pil
=
Image
.
fromarray
(
x_np
,
mode
=
"RGB"
)
# test 0
y_pil
=
F
.
adjust_saturation
(
x_pil
,
1
)
y_np
=
np
.
array
(
y_pil
)
torch
.
testing
.
assert_close
(
y_np
,
x_np
)
# test 1
y_pil
=
F
.
adjust_saturation
(
x_pil
,
0.5
)
y_np
=
np
.
array
(
y_pil
)
y_ans
=
[
2
,
4
,
8
,
87
,
128
,
173
,
39
,
25
,
138
,
133
,
215
,
88
]
y_ans
=
np
.
array
(
y_ans
,
dtype
=
np
.
uint8
).
reshape
(
x_shape
)
torch
.
testing
.
assert_close
(
y_np
,
y_ans
)
# test 2
y_pil
=
F
.
adjust_saturation
(
x_pil
,
2
)
y_np
=
np
.
array
(
y_pil
)
y_ans
=
[
0
,
6
,
22
,
0
,
149
,
255
,
32
,
0
,
255
,
4
,
255
,
0
]
y_ans
=
np
.
array
(
y_ans
,
dtype
=
np
.
uint8
).
reshape
(
x_shape
)
torch
.
testing
.
assert_close
(
y_np
,
y_ans
)
def
test_adjust_hue
():
x_shape
=
[
2
,
2
,
3
]
x_data
=
[
0
,
5
,
13
,
54
,
135
,
226
,
37
,
8
,
234
,
90
,
255
,
1
]
...
...
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