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
5de19dea
Unverified
Commit
5de19dea
authored
Feb 23, 2021
by
Nicolas Hug
Committed by
GitHub
Feb 23, 2021
Browse files
Put back call to optimze_for_mobile (#3431)
* put back * flake8
parent
0e32a12c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
android/test_app/make_assets.py
android/test_app/make_assets.py
+3
-3
No files found.
android/test_app/make_assets.py
View file @
5de19dea
import
torch
import
torch
import
torchvision
import
torchvision
from
torch.utils.mobile_optimizer
import
optimize_for_mobile
print
(
torch
.
__version__
)
print
(
torch
.
__version__
)
...
@@ -12,6 +13,5 @@ model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_320_fpn(
...
@@ -12,6 +13,5 @@ model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_320_fpn(
model
.
eval
()
model
.
eval
()
script_model
=
torch
.
jit
.
script
(
model
)
script_model
=
torch
.
jit
.
script
(
model
)
# TODO: put back call to optimize_for_mobile once
opt_script_model
=
optimize_for_mobile
(
script_model
)
# https://github.com/pytorch/pytorch/issues/52463 is fixed
opt_script_model
.
save
(
"app/src/main/assets/frcnn_mnetv3.pt"
)
script_model
.
save
(
"app/src/main/assets/frcnn_mnetv3.pt"
)
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