khanrc / pt.darts

PyTorch Implementation of DARTS: Differentiable Architecture Search
MIT License
439 stars 108 forks source link

It seems that there lost a parentheses in the compute_hessian function. -- (p-n) / 2.*eps #34

Open Frizy-up opened 4 years ago

Frizy-up commented 4 years ago

compute_hessian function last line : hessian = [(p-n) / 2.eps for p, n in zip(dalpha_pos, dalpha_neg)] should be changed to: hessian = [(p-n) / (2.eps) for p, n in zip(dalpha_pos, dalpha_neg)] according to the paper equation 8.

jkooy commented 4 years ago

I didn't find this at the beginning and have tried both these two. This indeed affects the update step but luckily not much on the result.