-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Addition of SmoothAdversarial and MACER Implementation in the Randomized Smoothing Module #1968
Addition of SmoothAdversarial and MACER Implementation in the Randomized Smoothing Module #1968
Conversation
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
…ypy style check Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
art/estimators/certification/randomized_smoothing/smooth_adversarial/train_smoothadv.py
Fixed
Show fixed
Hide fixed
art/estimators/certification/randomized_smoothing/smooth_adversarial/train_smoothadv.py
Fixed
Show fixed
Hide fixed
@@ -161,6 +194,12 @@ | |||
# Set model mode | |||
self._model.train(mode=training_mode) | |||
|
|||
if "train_method" in kwargs: | |||
if kwargs.get("train_method") == "macer": | |||
return fit_pytorch_macer(self, x, y, batch_size, nb_epochs, **kwargs) |
Check warning
Code scanning / CodeQL
Use of the return value of a procedure
@@ -136,9 +175,15 @@ | |||
""" | |||
import tensorflow as tf | |||
|
|||
if "train_method" in kwargs: | |||
if kwargs.get("train_method") == "macer": | |||
return fit_tensorflow_macer(self, x, y, batch_size, nb_epochs) |
Check warning
Code scanning / CodeQL
Use of the return value of a procedure
Codecov Report
@@ Coverage Diff @@
## dev_1.13.0 #1968 +/- ##
===============================================
+ Coverage 73.25% 85.20% +11.95%
===============================================
Files 257 289 +32
Lines 23928 25178 +1250
Branches 4346 4497 +151
===============================================
+ Hits 17529 21454 +3925
+ Misses 5417 2574 -2843
- Partials 982 1150 +168
|
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Tirth Mehta <tirthmehta05@gmail.com>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
Signed-off-by: Archit Gajpal <agajpal@cs.stonybrook.edu>
@beat-buesser this should be closed in favor of #2218 |
Closing this pull request and replacing it with #2218 |
Description
Links to Paper and Authors' code repository:
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