未验证 提交 f743bf9a 编写于 作者: H haoyuying 提交者: GitHub

Fix compatibility issues

上级 cf9f0cbb
...@@ -193,7 +193,7 @@ class ImageColorizeModule(RunModule, ImageServing): ...@@ -193,7 +193,7 @@ class ImageColorizeModule(RunModule, ImageServing):
Returns: Returns:
results(dict) : The model outputs, such as metrics. results(dict) : The model outputs, such as metrics.
''' '''
if Version(paddle.__version__) >= '2.1': if Version(paddle.__version__) >= '2.1' or Version(paddle.__version__) == '0.0.0':
img = self.preprocess(batch) img = self.preprocess(batch)
else: else:
img = self.preprocess(batch[0]) img = self.preprocess(batch[0])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册