未验证 提交 cbe7098e 编写于 作者: Y Yanzhan Yang 提交者: GitHub

handle nan in run.py test=develop (#2240)

上级 f480d474
......@@ -559,7 +559,7 @@ def check_mobile_results(args, fuse, mem_opt):
for i in range(len(values1)):
v1 = values1[i]
v2 = values2[len(shape) + i]
if abs(v1 - v2) > diff_threshold:
if ((not math.isnan(v1)) and math.isnan(v2)) or abs(v1 - v2) > diff_threshold:
error_index = index
break
checked_names.append(op_output_var_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册