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
ef103a59
Commit
ef103a59
authored
Aug 02, 2021
by
fengshuai03
Browse files
change dynameic shape
parent
c86ee9fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
tools/infer/utility.py
tools/infer/utility.py
+25
-25
No files found.
tools/infer/utility.py
View file @
ef103a59
...
@@ -168,45 +168,45 @@ def create_predictor(args, mode, logger):
...
@@ -168,45 +168,45 @@ def create_predictor(args, mode, logger):
if
mode
==
"det"
:
if
mode
==
"det"
:
min_input_shape
=
{
min_input_shape
=
{
"x"
:
[
1
,
3
,
50
,
50
],
"x"
:
[
1
,
3
,
50
,
50
],
"conv2d_92.tmp_0"
:
[
1
,
96
,
20
,
20
],
"conv2d_92.tmp_0"
:
[
1
,
120
,
20
,
20
],
"conv2d_91.tmp_0"
:
[
1
,
96
,
10
,
10
],
"conv2d_91.tmp_0"
:
[
1
,
24
,
10
,
10
],
"conv2d_59.tmp_0"
:
[
1
,
96
,
20
,
20
],
"conv2d_59.tmp_0"
:
[
1
,
96
,
20
,
20
],
"nearest_interp_v2_1.tmp_0"
:
[
1
,
9
6
,
10
,
10
],
"nearest_interp_v2_1.tmp_0"
:
[
1
,
25
6
,
10
,
10
],
"nearest_interp_v2_2.tmp_0"
:
[
1
,
9
6
,
20
,
20
],
"nearest_interp_v2_2.tmp_0"
:
[
1
,
25
6
,
20
,
20
],
"conv2d_124.tmp_0"
:
[
1
,
9
6
,
20
,
20
],
"conv2d_124.tmp_0"
:
[
1
,
25
6
,
20
,
20
],
"nearest_interp_v2_3.tmp_0"
:
[
1
,
2
4
,
20
,
20
],
"nearest_interp_v2_3.tmp_0"
:
[
1
,
6
4
,
20
,
20
],
"nearest_interp_v2_4.tmp_0"
:
[
1
,
2
4
,
20
,
20
],
"nearest_interp_v2_4.tmp_0"
:
[
1
,
6
4
,
20
,
20
],
"nearest_interp_v2_5.tmp_0"
:
[
1
,
2
4
,
20
,
20
],
"nearest_interp_v2_5.tmp_0"
:
[
1
,
6
4
,
20
,
20
],
"elementwise_add_7"
:
[
1
,
56
,
2
,
2
],
"elementwise_add_7"
:
[
1
,
56
,
2
,
2
],
"nearest_interp_v2_0.tmp_0"
:
[
1
,
9
6
,
2
,
2
]
"nearest_interp_v2_0.tmp_0"
:
[
1
,
25
6
,
2
,
2
]
}
}
max_input_shape
=
{
max_input_shape
=
{
"x"
:
[
1
,
3
,
2000
,
2000
],
"x"
:
[
1
,
3
,
2000
,
2000
],
"conv2d_92.tmp_0"
:
[
1
,
96
,
400
,
400
],
"conv2d_92.tmp_0"
:
[
1
,
120
,
400
,
400
],
"conv2d_91.tmp_0"
:
[
1
,
96
,
200
,
200
],
"conv2d_91.tmp_0"
:
[
1
,
24
,
200
,
200
],
"conv2d_59.tmp_0"
:
[
1
,
96
,
400
,
400
],
"conv2d_59.tmp_0"
:
[
1
,
96
,
400
,
400
],
"nearest_interp_v2_1.tmp_0"
:
[
1
,
9
6
,
200
,
200
],
"nearest_interp_v2_1.tmp_0"
:
[
1
,
25
6
,
200
,
200
],
"conv2d_124.tmp_0"
:
[
1
,
256
,
400
,
400
],
"conv2d_124.tmp_0"
:
[
1
,
256
,
400
,
400
],
"nearest_interp_v2_2.tmp_0"
:
[
1
,
9
6
,
400
,
400
],
"nearest_interp_v2_2.tmp_0"
:
[
1
,
25
6
,
400
,
400
],
"nearest_interp_v2_3.tmp_0"
:
[
1
,
2
4
,
400
,
400
],
"nearest_interp_v2_3.tmp_0"
:
[
1
,
6
4
,
400
,
400
],
"nearest_interp_v2_4.tmp_0"
:
[
1
,
2
4
,
400
,
400
],
"nearest_interp_v2_4.tmp_0"
:
[
1
,
6
4
,
400
,
400
],
"nearest_interp_v2_5.tmp_0"
:
[
1
,
2
4
,
400
,
400
],
"nearest_interp_v2_5.tmp_0"
:
[
1
,
6
4
,
400
,
400
],
"elementwise_add_7"
:
[
1
,
56
,
400
,
400
],
"elementwise_add_7"
:
[
1
,
56
,
400
,
400
],
"nearest_interp_v2_0.tmp_0"
:
[
1
,
9
6
,
400
,
400
]
"nearest_interp_v2_0.tmp_0"
:
[
1
,
25
6
,
400
,
400
]
}
}
opt_input_shape
=
{
opt_input_shape
=
{
"x"
:
[
1
,
3
,
640
,
640
],
"x"
:
[
1
,
3
,
640
,
640
],
"conv2d_92.tmp_0"
:
[
1
,
96
,
160
,
160
],
"conv2d_92.tmp_0"
:
[
1
,
120
,
160
,
160
],
"conv2d_91.tmp_0"
:
[
1
,
96
,
80
,
80
],
"conv2d_91.tmp_0"
:
[
1
,
24
,
80
,
80
],
"conv2d_59.tmp_0"
:
[
1
,
96
,
160
,
160
],
"conv2d_59.tmp_0"
:
[
1
,
96
,
160
,
160
],
"nearest_interp_v2_1.tmp_0"
:
[
1
,
9
6
,
80
,
80
],
"nearest_interp_v2_1.tmp_0"
:
[
1
,
25
6
,
80
,
80
],
"nearest_interp_v2_2.tmp_0"
:
[
1
,
9
6
,
160
,
160
],
"nearest_interp_v2_2.tmp_0"
:
[
1
,
25
6
,
160
,
160
],
"conv2d_124.tmp_0"
:
[
1
,
256
,
160
,
160
],
"conv2d_124.tmp_0"
:
[
1
,
256
,
160
,
160
],
"nearest_interp_v2_3.tmp_0"
:
[
1
,
2
4
,
160
,
160
],
"nearest_interp_v2_3.tmp_0"
:
[
1
,
6
4
,
160
,
160
],
"nearest_interp_v2_4.tmp_0"
:
[
1
,
2
4
,
160
,
160
],
"nearest_interp_v2_4.tmp_0"
:
[
1
,
6
4
,
160
,
160
],
"nearest_interp_v2_5.tmp_0"
:
[
1
,
2
4
,
160
,
160
],
"nearest_interp_v2_5.tmp_0"
:
[
1
,
6
4
,
160
,
160
],
"elementwise_add_7"
:
[
1
,
56
,
40
,
40
],
"elementwise_add_7"
:
[
1
,
56
,
40
,
40
],
"nearest_interp_v2_0.tmp_0"
:
[
1
,
9
6
,
40
,
40
]
"nearest_interp_v2_0.tmp_0"
:
[
1
,
25
6
,
40
,
40
]
}
}
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
]}
...
...
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