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
657f29e8
"vscode:/vscode.git/clone" did not exist on "3e8b63216e502a0dd7424c0fef4134187802b93f"
Commit
657f29e8
authored
Apr 27, 2022
by
andyjpaddle
Browse files
update trt dynamic shape for v3 rec
parent
f6532a0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
tools/infer/utility.py
tools/infer/utility.py
+4
-3
No files found.
tools/infer/utility.py
View file @
657f29e8
...
@@ -271,9 +271,10 @@ def create_predictor(args, mode, logger):
...
@@ -271,9 +271,10 @@ def create_predictor(args, mode, logger):
elif
mode
==
"rec"
:
elif
mode
==
"rec"
:
if
args
.
rec_algorithm
!=
"CRNN"
:
if
args
.
rec_algorithm
!=
"CRNN"
:
use_dynamic_shape
=
False
use_dynamic_shape
=
False
min_input_shape
=
{
"x"
:
[
1
,
3
,
32
,
10
]}
imgH
=
int
(
args
.
rec_image_shape
.
split
(
','
)[
1
])
max_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
32
,
1536
]}
min_input_shape
=
{
"x"
:
[
1
,
3
,
imgH
,
10
]}
opt_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
32
,
320
]}
max_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
imgH
,
1536
]}
opt_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
imgH
,
320
]}
elif
mode
==
"cls"
:
elif
mode
==
"cls"
:
min_input_shape
=
{
"x"
:
[
1
,
3
,
48
,
10
]}
min_input_shape
=
{
"x"
:
[
1
,
3
,
48
,
10
]}
max_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
48
,
1024
]}
max_input_shape
=
{
"x"
:
[
args
.
rec_batch_num
,
3
,
48
,
1024
]}
...
...
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