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
wangsen
paddle_dbnet
Commits
2b4aeabd
Unverified
Commit
2b4aeabd
authored
Aug 04, 2021
by
Double_V
Committed by
GitHub
Aug 04, 2021
Browse files
Merge pull request #3527 from fengxiaoshuai/add_dynamic_shape_input
add dynamic_input for pact
parents
da5d7ee3
fdc808ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
tools/infer/utility.py
tools/infer/utility.py
+21
-0
No files found.
tools/infer/utility.py
View file @
2b4aeabd
...
@@ -209,6 +209,27 @@ def create_predictor(args, mode, logger):
...
@@ -209,6 +209,27 @@ def create_predictor(args, mode, logger):
"elementwise_add_7"
:
[
1
,
56
,
40
,
40
],
"elementwise_add_7"
:
[
1
,
56
,
40
,
40
],
"nearest_interp_v2_0.tmp_0"
:
[
1
,
256
,
40
,
40
]
"nearest_interp_v2_0.tmp_0"
:
[
1
,
256
,
40
,
40
]
}
}
min_pact_shape
=
{
"nearest_interp_v2_26.tmp_0"
:[
1
,
256
,
20
,
20
],
"nearest_interp_v2_27.tmp_0"
:[
1
,
64
,
20
,
20
],
"nearest_interp_v2_28.tmp_0"
:[
1
,
64
,
20
,
20
],
"nearest_interp_v2_29.tmp_0"
:[
1
,
64
,
20
,
20
]
}
max_pact_shape
=
{
"nearest_interp_v2_26.tmp_0"
:[
1
,
256
,
400
,
400
],
"nearest_interp_v2_27.tmp_0"
:[
1
,
64
,
400
,
400
],
"nearest_interp_v2_28.tmp_0"
:[
1
,
64
,
400
,
400
],
"nearest_interp_v2_29.tmp_0"
:[
1
,
64
,
400
,
400
]
}
opt_pact_shape
=
{
"nearest_interp_v2_26.tmp_0"
:[
1
,
256
,
160
,
160
],
"nearest_interp_v2_27.tmp_0"
:[
1
,
64
,
160
,
160
],
"nearest_interp_v2_28.tmp_0"
:[
1
,
64
,
160
,
160
],
"nearest_interp_v2_29.tmp_0"
:[
1
,
64
,
160
,
160
]
}
min_input_shape
.
update
(
min_pact_shape
)
max_input_shape
.
update
(
max_pact_shape
)
opt_input_shape
.
update
(
opt_pact_shape
)
elif
mode
==
"rec"
:
elif
mode
==
"rec"
:
min_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
32
,
10
]}
min_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
32
,
10
]}
max_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
32
,
2000
]}
max_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
32
,
2000
]}
...
...
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