-
Notifications
You must be signed in to change notification settings - Fork 77
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
Maybe a wrong loss function #15
Comments
Hi, It's not wrong. The "positive" gradient of |
Hi, Takeru, Thanks for your kind reply, I was indeed confused it with the GD algorithm. But I still have another question as following: according to the code, we know that the 'd' is randomly initialized first, and the gradient 'grad' on current 'd' is calculated, then this gradient 'grad' is taken as the 'r_vadv'. While my point is that we should take the 'd+grad' as 'r_vadv', because the summation of these two vector is actually the adversarial direction against the current sample x. Do you think so? Looking forward to your reply, thanks again! |
Right, that would be another option for estimating the adversarial perturbation and might improve the performance. |
Hello, Takeru, Thanks for your great works.
I find that there may be an error with your code, at the 46th line in vat.py:
" dist = L.kl_divergence_with_logit(logit_p, logit_m)",
where I think you may add a negative sign before KL_divergence, because here we want to maximize the distance to get the virtual adversarial direction.
Am I right?
The text was updated successfully, but these errors were encountered: