-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Imperceptible asr bug detach #1677
Merged
beat-buesser
merged 2 commits into
Trusted-AI:dev_1.10.2
from
davidslater:imperceptible-asr-bug-detach
May 11, 2022
Merged
Imperceptible asr bug detach #1677
beat-buesser
merged 2 commits into
Trusted-AI:dev_1.10.2
from
davidslater:imperceptible-asr-bug-detach
May 11, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: David Slater <david.slater@twosixlabs.com>
This was referenced May 10, 2022
Codecov Report
@@ Coverage Diff @@
## dev_1.10.2 #1677 +/- ##
==============================================
- Coverage 88.10% 87.35% -0.75%
==============================================
Files 259 259
Lines 21349 21349
Branches 3789 3789
==============================================
- Hits 18809 18649 -160
- Misses 1597 1755 +158
- Partials 943 945 +2
|
art/attacks/evasion/imperceptible_asr/imperceptible_asr_pytorch.py
Outdated
Show resolved
Hide resolved
beat-buesser
approved these changes
May 10, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @davidslater Thank you very much! Your solution looks good to me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When running imperceptible ASR attack on
pytorch_deep_speech
on GPU, I sometimes run into this error:I believe it only occurs sometimes due to specific branching conditions being hit.
See also twosixlabs/armory#1472
This update just ensures that when moving from Tensor to numpy array,
.detach().cpu().numpy()
is always called. This should always be safe (detach and cpu are no-ops if they are already true).Fixes # (issue)
Type of change
Please check all relevant options.
Testing
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
Test Configuration:
Checklist