Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the compensate_beta in pruning depthwise separable layer? #7

Open
imyangs opened this issue Sep 24, 2021 · 0 comments
Open

Comments

@imyangs
Copy link

imyangs commented Sep 24, 2021

Dear author, thank u for your excellent work and code. Recently when I read the convert code, I cannot completely understand the logic behand the beta compensate, can you explain it or point out the reference?
BTW, why we only need to compensate beta for pointwise layer rather than both the depthwise and pointwise layers?

ResRep/rr/resrep_convert.py

Lines 201 to 203 in aac6ed3

for pri in pruned_ids:
compensate_beta = np.abs(fol_dw_beta_value[pri]) * (pw_kernel_value[:, pri, 0, 0] * pw_gamma_value / np.sqrt(pw_var_value + 1e-5)) # TODO because of relu
pw_beta_value += compensate_beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant