Skip to content

Commit

Permalink
fix SLANeXt export bug (#14512)
Browse files Browse the repository at this point in the history
* add slanext models

* refine codes

* refine codes

* refine codes

* fix export SLANeXt
  • Loading branch information
liu-jiaxuan authored Jan 7, 2025
1 parent 359ab6c commit a6b96bb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ppocr/utils/export_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ def dynamic_to_static(model, arch_config, logger, input_shape=None):
],
full_graph=True,
)
elif arch_config["algorithm"] == "SLANeXt":
model = paddle.jit.to_static(
model,
input_spec=[
paddle.static.InputSpec(shape=[-1, 1, 512, 512], dtype="float32")
],
full_graph=True,
)
elif arch_config["algorithm"] == "PP-FormulaNet-L":
model = paddle.jit.to_static(
model,
Expand Down

0 comments on commit a6b96bb

Please sign in to comment.