未验证 提交 d9884e20 编写于 作者: Z zyfncg 提交者: GitHub

adjust the args checking of backward in yaml (#40091)

上级 909d1e61
......@@ -56,8 +56,9 @@ class BackwardAPI(BaseAPI):
# check the attributes of backward
for attr in self.attrs['names']:
assert attr in fw_attrs['names'] and self.attrs['attr_info'][attr][0] == fw_attrs['attr_info'][attr][0], \
f"{self.api} : Attribute error: The attribute({attr}) of backward isn't consistent with forward api. \
assert (attr in fw_attrs['names'] and self.attrs['attr_info'][attr][0] == fw_attrs['attr_info'][attr][0]) or \
self.attrs['attr_info'][attr][1] is not None, \
f"{self.api} : Attribute error: The attribute({attr}) of backward isn't consistent with forward api or doesn't have default value. \
Please check the args of {self.api} in yaml."
# check the output of backward
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册