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
13961868
Unverified
Commit
13961868
authored
Dec 06, 2021
by
xiaoting
Committed by
GitHub
Dec 06, 2021
Browse files
Merge pull request #4845 from andyjpaddle/fix_trt_dynamic_shape
fix rec trt dynamic shape error
parents
81e0e4ba
5d64077d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
tools/infer/utility.py
tools/infer/utility.py
+7
-2
No files found.
tools/infer/utility.py
View file @
13961868
...
@@ -271,8 +271,13 @@ def create_predictor(args, mode, logger):
...
@@ -271,8 +271,13 @@ def create_predictor(args, mode, logger):
min_input_shape
=
{
"x"
:
[
1
,
3
,
10
,
10
]}
min_input_shape
=
{
"x"
:
[
1
,
3
,
10
,
10
]}
max_input_shape
=
{
"x"
:
[
1
,
3
,
512
,
512
]}
max_input_shape
=
{
"x"
:
[
1
,
3
,
512
,
512
]}
opt_input_shape
=
{
"x"
:
[
1
,
3
,
256
,
256
]}
opt_input_shape
=
{
"x"
:
[
1
,
3
,
256
,
256
]}
config
.
set_trt_dynamic_shape_info
(
min_input_shape
,
max_input_shape
,
if
mode
==
"rec"
:
opt_input_shape
)
if
args
.
rec_algorithm
==
"CRNN"
:
config
.
set_trt_dynamic_shape_info
(
min_input_shape
,
max_input_shape
,
opt_input_shape
)
else
:
config
.
set_trt_dynamic_shape_info
(
min_input_shape
,
max_input_shape
,
opt_input_shape
)
else
:
else
:
config
.
disable_gpu
()
config
.
disable_gpu
()
...
...
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