Skip to content

Commit 74a318e

Browse files
Irina NicolaeIrina Nicolae
authored andcommitted
Merge changes from dev
Changes: - Add support for ensembles under Classifier interface - Add data generators - Add fit_generator to classifiers and adversarial trainer - Add C&W L_inf attack - Add master seed for random number generators - Add an adversarial detector based on features & some feature implementations - Add pylint to Travis & code clean-up - Restructure analyzers from poisoning module
1 parent 40f435c commit 74a318e

File tree

74 files changed

+4302
-870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4302
-870
lines changed

.pylintrc

Lines changed: 574 additions & 0 deletions
Large diffs are not rendered by default.

.travis.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,26 @@ sudo: required
22
dist: trusty
33
language: python
44
env:
5+
- KERAS_BACKEND=tensorflow TENSORFLOW_V=1.5.0
6+
- KERAS_BACKEND=tensorflow TENSORFLOW_V=1.6.0
7+
- KERAS_BACKEND=tensorflow TENSORFLOW_V=1.7.0
8+
- KERAS_BACKEND=tensorflow TENSORFLOW_V=1.10.0
9+
python:
10+
- "2.7"
11+
- "3.5"
512
matrix:
613
include:
7-
- python: 2.7
8-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.5.0
9-
- python: 2.7
10-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.6.0
11-
- python: 2.7
12-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.7.0
13-
- python: 2.7
14-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.10.0
15-
- python: 3.5
16-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.5.0
17-
- python: 3.5
18-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.6.0
19-
- python: 3.5
20-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.7.0
21-
- python: 3.5
22-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.10.0
23-
exclude:
24-
- env:
14+
- python: 3.5
15+
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.10.0
16+
script:
17+
- (pycodestyle --max-line-length=120 art || exit 0) && (pylint -rn art || exit 0)
2518

2619
before_install:
2720
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
2821
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
2922
else
3023
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
3124
fi
32-
- sed -i "s/tensorflow/tensorflow==${TENSORFLOW_V}/" requirements.txt
3325
- sed -i "s/tensorflow/tensorflow==${TENSORFLOW_V}/" test_requirements.txt
3426
- bash miniconda.sh -b -p $HOME/miniconda
3527
- export PATH="$HOME/miniconda/bin:$PATH"
@@ -39,13 +31,11 @@ before_install:
3931
- conda update -q conda
4032
- conda info -a
4133

42-
install:
34+
install:
4335
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --yes --file requirements.txt
44-
# Can't specify channels in requirements.txt for conda
45-
# - conda install -y pytorch -c pytorch
4636
- source activate test-environment
4737
- pip install -q -r test_requirements.txt
48-
# - pip install -e .[tests] | cat
38+
- pip install pylint pycodestyle
4939
- conda install libgcc
5040
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/travis/miniconda/envs/test-environment/lib
5141
- export PYTHONPATH=".":$PYTHONPATH

art/attacks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Module providing adversarial attacks under a common interface.
33
"""
44
from art.attacks.attack import Attack
5-
from art.attacks.carlini import CarliniL2Method
5+
from art.attacks.carlini import CarliniL2Method, CarliniLInfMethod
66
from art.attacks.deepfool import DeepFool
77
from art.attacks.fast_gradient import FastGradientMethod
88
from art.attacks.iterative_method import BasicIterativeMethod

art/attacks/carlini.py

Lines changed: 569 additions & 150 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)