提交 bc3b4444 编写于 作者: P principal87

更新模型、修改Promise和Callback调用方式、处理告警

Signed-off-by: Nprincipal87 <nierong3@huawei.com>
上级 0c1985c8
...@@ -165,11 +165,12 @@ bool allclose(float *a, float *b, uint64_t count, float rtol = 1e-05, ...@@ -165,11 +165,12 @@ bool allclose(float *a, float *b, uint64_t count, float rtol = 1e-05,
if (i == count - 1) { if (i == count - 1) {
printf(" ……\n"); printf(" ……\n");
printf("\n *** Total fail_count: %u\n", fail_count); printf("\n *** Total fail_count: %u\n", fail_count);
printf("\n fabs(a[i] - b[i])/(fabs(b[i])+1) : %f\n", if (fail_count != 0) {
tol / fail_count); printf("\n fabs(a[i] - b[i])/(fabs(b[i])+1) : %f\n",
printf("\n fabs(a[i] - b[i]) : %f\n", tol1 / fail_count); tol / fail_count);
printf("\n fabs(a[i] - b[i])/fabs(b[i]) : %f\n", tol2 / fail_count); printf("\n fabs(a[i] - b[i]) : %f\n", tol1 / fail_count);
printf("\n fabs(a[i] - b[i])/fabs(b[i]) : %f\n", tol2 / fail_count);
}
c = c + count; c = c + count;
printf("\n avg : %f\n", sum / count); printf("\n avg : %f\n", sum / count);
printf("\n min : %f\n", minimum); printf("\n min : %f\n", minimum);
...@@ -254,10 +255,12 @@ bool allclose_int8(uint8_t *a, uint8_t *b, uint64_t count, float rtol = 1e-05, ...@@ -254,10 +255,12 @@ bool allclose_int8(uint8_t *a, uint8_t *b, uint64_t count, float rtol = 1e-05,
if (i == count - 1) { if (i == count - 1) {
printf(" ……\n"); printf(" ……\n");
printf("\n *** Total fail_count: %u\n", fail_count); printf("\n *** Total fail_count: %u\n", fail_count);
printf("\n fabs(a[i] - b[i])/(fabs(b[i])+1) : %f\n", if (fail_count != 0) {
tol / fail_count); printf("\n fabs(a[i] - b[i])/(fabs(b[i])+1) : %f\n",
printf("\n fabs(a[i] - b[i]) : %f\n", tol1 / fail_count); tol / fail_count);
printf("\n fabs(a[i] - b[i])/fabs(b[i]) : %f\n", tol2 / fail_count); printf("\n fabs(a[i] - b[i]) : %f\n", tol1 / fail_count);
printf("\n fabs(a[i] - b[i])/fabs(b[i]) : %f\n", tol2 / fail_count);
}
c = c + count; c = c + count;
printf("\n avg : %f\n", sum / count); printf("\n avg : %f\n", sum / count);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册