提交 94a29f11 编写于 作者: J jiangjiajun

add x2paddle for paddle export to onnx

上级 d56d4637
......@@ -30,6 +30,10 @@ def export_onnx(model_dir, save_dir, fixed_input_shape):
def export_onnx_model(model, save_dir):
if model.model_type == "detector" or model.__class__.__name__ == "FastSCNN":
logging.error(
"Only image classifier models and semantic segmentation models(except FastSCNN) are supported to export to ONNX"
)
try:
import x2paddle
if x2paddle.__version__ < '0.7.4':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册