Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Bug-fixed for _compute_hessian in Pytorch NAS Darts #3058

Merged
merged 1 commit into from
Nov 8, 2020

Conversation

hroken
Copy link
Contributor

@hroken hroken commented Nov 3, 2020

In Issues#3044,
I report a bug about Pytorch darts in train.py, which is located at
nni\algorithms\nas\pytorch\darts\trainer.py

In the darts trainer.py, which function is _compute_hessian, shows :
"hessian = (dalpha { L_trn(w+, alpha) } - dalpha { L_trn(w-, alpha) }) / (2*eps)"
but the below is written by this :
hessian = [(p - n) / 2. * eps for p, n in zip(dalpha_pos, dalpha_neg)]

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

Good luck!

@ultmaster ultmaster linked an issue Nov 3, 2020 that may be closed by this pull request
@liuzhe-lz liuzhe-lz merged commit a9b87c9 into microsoft:master Nov 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question in darts _compute_hessian
4 participants