fix SLANeXt export bug (#14512)

* add slanext models

* refine codes

* refine codes

* refine codes

* fix export SLANeXt
This commit is contained in:
Liu Jiaxuan 2025-01-07 19:21:34 +08:00 committed by GitHub
parent 359ab6cb76
commit a6b96bbfb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,