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
nni
Commits
efb3397a
"...git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "246dd52acadbd7785c1a1fa5da23922154cfc0fb"
Unverified
Commit
efb3397a
authored
Aug 02, 2021
by
Ningxin Zheng
Committed by
GitHub
Aug 02, 2021
Browse files
Bugbash for speedup example. (#3996)
parent
449fb125
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
examples/model_compress/pruning/speedup/speedup_nanodet.py
examples/model_compress/pruning/speedup/speedup_nanodet.py
+1
-1
examples/model_compress/pruning/speedup/speedup_yolov3.py
examples/model_compress/pruning/speedup/speedup_yolov3.py
+1
-1
No files found.
examples/model_compress/pruning/speedup/speedup_nanodet.py
View file @
efb3397a
...
@@ -12,7 +12,7 @@ NanoDet model can be installed from https://github.com/RangiLyu/nanodet.git
...
@@ -12,7 +12,7 @@ NanoDet model can be installed from https://github.com/RangiLyu/nanodet.git
cfg_path
=
r
"nanodet/config/nanodet-RepVGG-A0_416.yml"
cfg_path
=
r
"nanodet/config/nanodet-RepVGG-A0_416.yml"
load_config
(
cfg
,
cfg_path
)
load_config
(
cfg
,
cfg_path
)
model
=
build_model
(
cfg
.
model
)
model
=
build_model
(
cfg
.
model
)
.
cpu
()
dummy_input
=
torch
.
rand
(
8
,
3
,
416
,
416
)
dummy_input
=
torch
.
rand
(
8
,
3
,
416
,
416
)
op_names
=
[]
op_names
=
[]
...
...
examples/model_compress/pruning/speedup/speedup_yolov3.py
View file @
efb3397a
...
@@ -10,7 +10,7 @@ prefix = '/home/user/PyTorch-YOLOv3' # replace this path with yours
...
@@ -10,7 +10,7 @@ prefix = '/home/user/PyTorch-YOLOv3' # replace this path with yours
# Load the YOLO model
# Load the YOLO model
model
=
models
.
load_model
(
model
=
models
.
load_model
(
"%s/config/yolov3.cfg"
%
prefix
,
"%s/config/yolov3.cfg"
%
prefix
,
"%s/yolov3.weights"
%
prefix
)
"%s/yolov3.weights"
%
prefix
)
.
cpu
()
model
.
eval
()
model
.
eval
()
dummy_input
=
torch
.
rand
(
8
,
3
,
320
,
320
)
dummy_input
=
torch
.
rand
(
8
,
3
,
320
,
320
)
model
(
dummy_input
)
model
(
dummy_input
)
...
...
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