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

Hessian computation issue (seems like there is a bug) #43

Open
MartinXPN opened this issue Jul 2, 2021 · 0 comments
Open

Hessian computation issue (seems like there is a bug) #43

MartinXPN opened this issue Jul 2, 2021 · 0 comments

Comments

@MartinXPN
Copy link

MartinXPN commented Jul 2, 2021

The original implementation of DARTS seems to be dividing the (positive - negative) by (2 * eps): Code

return [(x-y).div_(2*R) for x, y in zip(grads_p, grads_n)]

In the implementation of pt.darts, seems like the braces for (2 * eps) are omitted. Which leads to wrong values of hessian and the final expression is evaluated as eps * (positive - negative) / 2:

hessian = [(p-n) / 2.*eps for p, n in zip(dalpha_pos, dalpha_neg)]

Shouldn't the expression be (2 * eps) instead of 2 * eps?

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