未验证 提交 d910e355 编写于 作者: B Bin Lu 提交者: GitHub

Update engine.py

上级 63215d1e
...@@ -394,13 +394,10 @@ class ExportModel(nn.Layer): ...@@ -394,13 +394,10 @@ class ExportModel(nn.Layer):
x = self.base_model(x) x = self.base_model(x)
if isinstance(x, list): if isinstance(x, list):
x = x[0] x = x[0]
if self.infer_model_name is not None: if self.infer_model_name is not None:
x = x[self.infer_model_name] x = x[self.infer_model_name]
if self.infer_output_key is not None: if self.infer_output_key is not None:
x = x[self.infer_output_key] x = x[self.infer_output_key]
if self.softmax is not None: if self.softmax is not None:
x = self.softmax(x) x = self.softmax(x)
return x return x
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册