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
0e62c34f
Unverified
Commit
0e62c34f
authored
Mar 02, 2023
by
Philip Meier
Committed by
GitHub
Mar 02, 2023
Browse files
fix code format (#7377)
parent
caf12f84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
test/smoke_test.py
test/smoke_test.py
+2
-1
No files found.
test/smoke_test.py
View file @
0e62c34f
...
...
@@ -27,6 +27,7 @@ def smoke_test_torchvision_read_decode() -> None:
if
img_png
.
ndim
!=
3
or
img_png
.
numel
()
<
100
:
raise
RuntimeError
(
f
"Unexpected shape of img_png:
{
img_png
.
shape
}
"
)
def
smoke_test_compile
()
->
None
:
model
=
resnet50
().
cuda
()
model
=
torch
.
compile
(
model
)
...
...
@@ -34,6 +35,7 @@ def smoke_test_compile() -> None:
out
=
model
(
x
)
print
(
f
"torch.compile model output:
{
out
.
shape
}
"
)
def
smoke_test_torchvision_resnet50_classify
(
device
:
str
=
"cpu"
)
->
None
:
img
=
read_image
(
str
(
SCRIPT_DIR
/
".."
/
"gallery"
/
"assets"
/
"dog2.jpg"
)).
to
(
device
)
...
...
@@ -73,6 +75,5 @@ def main() -> None:
smoke_test_torchvision_resnet50_classify
(
"mps"
)
if
__name__
==
"__main__"
:
main
()
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