未验证 提交 2bc72a06 编写于 作者: C Chen Weihang 提交者: GitHub

fix eager gen grad multi out error (#41358)

上级 af8d2482
...@@ -88,9 +88,9 @@ VECTOR_TENSOR_MEMBER_TEMPLATE = \ ...@@ -88,9 +88,9 @@ VECTOR_TENSOR_MEMBER_TEMPLATE = \
CLEAR_VECTOR_TENSOR_WRAPPERS_TEMPLATE = \ CLEAR_VECTOR_TENSOR_WRAPPERS_TEMPLATE = \
""" """
for (auto tw: {}) { for (auto& tw : {}) {{
tw.clear(); tw.clear();
}; }}
""" """
SET_ATTR_METHOD_TEMPLATE = \ SET_ATTR_METHOD_TEMPLATE = \
......
...@@ -193,7 +193,7 @@ class BaseAPI(object): ...@@ -193,7 +193,7 @@ class BaseAPI(object):
f"{api_name} : Output type error: the output type only support Tensor and Tensor[], \ f"{api_name} : Output type error: the output type only support Tensor and Tensor[], \
but now is {out_type}." but now is {out_type}."
return out_type, result.group('name') return output_type_map[out_type], result.group('name')
else: else:
if output_item.strip() in output_type_map: if output_item.strip() in output_type_map:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册