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
b0d1dca6
Unverified
Commit
b0d1dca6
authored
Jan 28, 2021
by
zhoujun
Committed by
GitHub
Jan 28, 2021
Browse files
fix starnet export (#1850)
* fix starnet export * fix bug * add note
parent
25bf9229
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
tools/export_model.py
tools/export_model.py
+9
-2
No files found.
tools/export_model.py
View file @
b0d1dca6
...
...
@@ -52,9 +52,16 @@ def main():
save_path
=
'{}/inference'
.
format
(
config
[
'Global'
][
'save_inference_dir'
])
infer_shape
=
[
3
,
-
1
,
-
1
]
infer_shape
=
[
3
,
-
1
,
-
1
]
if
config
[
'Architecture'
][
'model_type'
]
==
"rec"
:
infer_shape
=
[
3
,
32
,
-
1
]
infer_shape
=
[
3
,
32
,
-
1
]
# for rec model, H must be 32
if
'Transform'
in
config
[
'Architecture'
]
and
config
[
'Architecture'
][
'Transform'
]
is
not
None
and
config
[
'Architecture'
][
'Transform'
][
'name'
]
==
'TPS'
:
logger
.
info
(
'When there is tps in the network, variable length input is not supported, and the input size needs to be the same as during training'
)
infer_shape
[
-
1
]
=
100
model
=
to_static
(
model
,
...
...
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