浏览代码

optimize code

Channingss 5 年之前
父节点
当前提交
1f188ffcec
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      paddlex/convertor.py

+ 1 - 1
paddlex/convertor.py

@@ -31,7 +31,7 @@ def export_onnx(model_dir, save_dir, fixed_input_shape):
 
 def export_onnx_model(model, save_dir, opset_version=10):
     if model.__class__.__name__ == "FastSCNN" or (
-            model.model_type != "detector" and
+            model.model_type == "detector" and
             model.__class__.__name__ != "YOLOv3"):
         logging.error(
             "Only image classifier models, detection models(YOLOv3) and semantic segmentation models(except FastSCNN) are supported to export to ONNX"