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

Implement Mixup in Numpy, PyTorch, and TensorFlow #1885

Merged
merged 9 commits into from
Nov 16, 2022

Conversation

f4str
Copy link
Collaborator

@f4str f4str commented Oct 19, 2022

Description

Implementation of the Mixup data augmentation defense in the Numpy, PyTorch, and TensorFlow frameworks.

Fixes # (issue)

Type of change

Please check all relevant options.

  • Improvement (non-breaking)
  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing

Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.

  • Tests for the Mixup preprocessor in Numpy
  • Tests for the Mixup preprocessor in PyTorch
  • Tests for the Mixup preprocessor in TensorFlow

Test Configuration:

  • OS
  • Python version
  • ART version or commit number
  • TensorFlow / Keras / PyTorch / MXNet version

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2022

Codecov Report

Merging #1885 (cb5a91a) into dev_1.13.0 (89bf92f) will increase coverage by 0.08%.
The diff coverage is 90.24%.

Impacted file tree graph

@@              Coverage Diff               @@
##           dev_1.13.0    #1885      +/-   ##
==============================================
+ Coverage       85.87%   85.95%   +0.08%     
==============================================
  Files             248      254       +6     
  Lines           23310    23587     +277     
  Branches         4212     4268      +56     
==============================================
+ Hits            20017    20274     +257     
- Misses           2230     2239       +9     
- Partials         1063     1074      +11     
Impacted Files Coverage Δ
art/defences/preprocessor/mixup/mixup.py 90.00% <90.00%> (ø)
art/defences/preprocessor/mixup/mixup_pytorch.py 90.00% <90.00%> (ø)
...rt/defences/preprocessor/mixup/mixup_tensorflow.py 90.00% <90.00%> (ø)
art/defences/preprocessor/__init__.py 100.00% <100.00%> (ø)
art/estimators/certification/abstain.py 90.90% <0.00%> (-9.10%) ⬇️
art/estimators/poison_mitigation/strip/strip.py 94.44% <0.00%> (-5.56%) ⬇️
art/attacks/evasion/boundary.py 92.77% <0.00%> (-1.21%) ⬇️
.../defences/preprocessor/cutout/cutout_tensorflow.py 97.77% <0.00%> (ø)
art/defences/preprocessor/cutout/cutout_pytorch.py 98.11% <0.00%> (ø)
... and 1 more

@lgtm-com
Copy link

lgtm-com bot commented Oct 20, 2022

This pull request introduces 2 alerts when merging f5a8697 into 20b01a3 - view on LGTM.com

new alerts:

  • 2 for Module is imported more than once

@beat-buesser beat-buesser self-requested a review October 20, 2022 12:03
@beat-buesser beat-buesser self-assigned this Oct 20, 2022
@beat-buesser beat-buesser added the enhancement New feature or request label Oct 20, 2022
@beat-buesser beat-buesser added this to the ART 1.13.0 milestone Oct 20, 2022
@beat-buesser beat-buesser changed the base branch from main to dev_1.13.0 October 20, 2022 12:03
@lgtm-com
Copy link

lgtm-com bot commented Oct 20, 2022

This pull request introduces 2 alerts when merging f5a8697 into 89bf92f - view on LGTM.com

new alerts:

  • 2 for Module is imported more than once

@lgtm-com
Copy link

lgtm-com bot commented Oct 20, 2022

This pull request introduces 2 alerts when merging 998761d into 89bf92f - view on LGTM.com

new alerts:

  • 2 for Module is imported more than once

Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 21, 2022

This pull request introduces 2 alerts when merging d0b58f8 into 89bf92f - view on LGTM.com

new alerts:

  • 2 for Module is imported more than once

Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 22, 2022

This pull request introduces 2 alerts when merging 9eb621f into 89bf92f - view on LGTM.com

new alerts:

  • 2 for Module is imported more than once

Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 27, 2022

This pull request introduces 2 alerts when merging d8a9783 into 89bf92f - view on LGTM.com

new alerts:

  • 2 for Module is imported more than once

Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
@lgtm-com
Copy link

lgtm-com bot commented Oct 29, 2022

This pull request introduces 4 alerts when merging 3314d6c into 89bf92f - view on LGTM.com

new alerts:

  • 2 for Wrong name for an argument in a call
  • 2 for Module is imported more than once

@beat-buesser beat-buesser added this to Pull request open in ART 1.13.0 Nov 10, 2022
@beat-buesser beat-buesser moved this from Pull request open to Pull request review in ART 1.13.0 Nov 10, 2022
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 12, 2022

This pull request introduces 2 alerts when merging cb5a91a into c366b1d - view on LGTM.com

new alerts:

  • 2 for Module is imported more than once

Copy link
Collaborator

@beat-buesser beat-buesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @f4str Thank you very much! LGTM

@beat-buesser beat-buesser merged commit e3e1278 into Trusted-AI:dev_1.13.0 Nov 16, 2022
ART 1.13.0 automation moved this from Pull request review to Pull request done Nov 16, 2022
@f4str f4str deleted the mixup-implementation branch December 15, 2022 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
ART 1.13.0
  
Pull request done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants