mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-11-30 17:05:57 +00:00
fix SLANeXt export bug (#14512)
* add slanext models * refine codes * refine codes * refine codes * fix export SLANeXt
This commit is contained in:
parent
359ab6cb76
commit
a6b96bbfb1
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user