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
db530d8c
Unverified
Commit
db530d8c
authored
Aug 16, 2021
by
Nicolas Hug
Committed by
GitHub
Aug 16, 2021
Browse files
More robust assertion checks in test_to_tensor_video (#4258)
parent
d7fa36f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
test/test_transforms_video.py
test/test_transforms_video.py
+4
-0
No files found.
test/test_transforms_video.py
View file @
db530d8c
...
...
@@ -133,12 +133,16 @@ class TestVideoTransforms():
with
pytest
.
raises
(
TypeError
):
np_rng
=
np
.
random
.
RandomState
(
0
)
trans
(
np_rng
.
rand
(
numFrames
,
height
,
width
,
1
).
tolist
())
with
pytest
.
raises
(
TypeError
):
trans
(
torch
.
rand
((
numFrames
,
height
,
width
,
1
),
dtype
=
torch
.
float
))
with
pytest
.
raises
(
ValueError
):
trans
(
torch
.
ones
((
3
,
numFrames
,
height
,
width
,
3
),
dtype
=
torch
.
uint8
))
with
pytest
.
raises
(
ValueError
):
trans
(
torch
.
ones
((
height
,
width
,
3
),
dtype
=
torch
.
uint8
))
with
pytest
.
raises
(
ValueError
):
trans
(
torch
.
ones
((
width
,
3
),
dtype
=
torch
.
uint8
))
with
pytest
.
raises
(
ValueError
):
trans
(
torch
.
ones
((
3
),
dtype
=
torch
.
uint8
))
trans
.
__repr__
()
...
...
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