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

fix CarliniWagnerL2 dtype bug #1218

Merged
merged 1 commit into from
Sep 23, 2021
Merged

fix CarliniWagnerL2 dtype bug #1218

merged 1 commit into from
Sep 23, 2021

Conversation

LPirch
Copy link

@LPirch LPirch commented Sep 23, 2021

I found a bug that causes a crash when the provided x array in the CarliniWagnerL2 attack is of dtype float64. The float64 dtype is propagated to y by the util function get_or_guess_labels. Since x is casted to float32afterwards, this causes a type mismatch during optimization.

I trivially solved this by moving the cast operation upwards which does not have any other effect but prevents the above bug.

@alkaet alkaet merged commit 95d5bc9 into cleverhans-lab:master Sep 23, 2021
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

Successfully merging this pull request may close these issues.

3 participants