Skip to content

Commit 9a7dbc4

Browse files
Irina NicolaeIrina Nicolae
authored andcommitted
Merge new features into release
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 pylint to Travis & code clean-up - Restructure analyzers from poisoning module
2 parents cd6786e + 74a318e commit 9a7dbc4

File tree

68 files changed

+3830
-883
lines changed

Some content is hidden

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

68 files changed

+3830
-883
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
@@ -1,34 +1,26 @@
11
sudo: required
22
dist: trusty
33
language: python
4+
env:
5+
- KERAS_BACKEND=tensorflow TENSORFLOW_V=1.5.0
6+
- KERAS_BACKEND=tensorflow TENSORFLOW_V=1.7.0
7+
- KERAS_BACKEND=tensorflow TENSORFLOW_V=1.10.0
8+
python:
9+
- "2.7"
10+
- "3.5"
411
matrix:
512
include:
6-
- python: 2.7
7-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.5.0
8-
- python: 2.7
9-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.6.0
10-
- python: 2.7
11-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.7.0
12-
- python: 2.7
13-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.10.0
14-
- python: 3.5
15-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.5.0
16-
- python: 3.5
17-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.6.0
18-
- python: 3.5
19-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.7.0
20-
- python: 3.5
21-
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.10.0
22-
exclude:
23-
- env:
13+
- python: 3.5
14+
env: KERAS_BACKEND=tensorflow TENSORFLOW_V=1.10.0
15+
script:
16+
- (pycodestyle --max-line-length=120 art || exit 0) && (pylint -rn art || exit 0)
2417

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

41-
install:
33+
install:
4234
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --yes --file requirements.txt
43-
# Can't specify channels in requirements.txt for conda
44-
# - conda install -y pytorch -c pytorch
4535
- source activate test-environment
4636
- pip install -q -r test_requirements.txt
47-
# - pip install -e .[tests] | cat
37+
- pip install pylint pycodestyle
4838
- conda install libgcc
4939
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/travis/miniconda/envs/test-environment/lib
5040
- 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)