Skip to content

关于MSE准则迭代求解最优scale的疑问 #25

@weihChen

Description

@weihChen

你好,在函数forward_net_octav中有如下mse准则下迭代求解最优scale的代码:

abs_x = np.abs(ort_inputs[i])
s_n = abs_x.sum() / abs_x[abs_x > 0].size
for _ in range(20):
    s_n_plus_1 = abs_x[abs_x > s_n].sum() / \
               (1 / (4 ** 8) / 3 / unsigned * abs_x[abs_x <= s_n].size + abs_x[abs_x > s_n].size)
    if np.abs(s_n_plus_1 - s_n) < 1e-6:
        break
    s_n = s_n_plus_1

想请问下这里

 s_n_plus_1 = abs_x[abs_x > s_n].sum() / \
               (1 / (4 ** 8) / 3 / unsigned * abs_x[abs_x <= s_n].size + abs_x[abs_x > s_n].size)

迭代更新scale公式的物理含义是什么呢?是如何推导得到的呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions