Browse Source

support save in model predict

gaotingquan 1 year ago
parent
commit
ce6205608d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      paddlex/engine.py

+ 2 - 0
paddlex/engine.py

@@ -45,5 +45,7 @@ class Engine(object):
         elif self._mode == "predict":
             for res in self._model.predict():
                 res.print(json_format=False)
+            if self._output:
+                res.save_all(save_path=self._output)
         else:
             raise_unsupported_api_error(f"{self._mode}", self.__class__)