Skip to content

Commit

Permalink
fixed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Rauber committed Oct 23, 2019
1 parent f0a5825 commit 7806c6f
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion foolbox/attacks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np

from ..v1.attacks.base import Attack as BaseAttack
from ..advesarial import Adversarial
from ..adversarial import Adversarial
from ..adversarial import StopAttack
from ..batching import run_parallel

Expand Down
4 changes: 2 additions & 2 deletions foolbox/tests/test_attacks.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from unittest.mock import Mock
import pytest

from foolbox import attacks
from foolbox import Adversarial
from foolbox.v1 import attacks
from foolbox.v1 import Adversarial


# def test_abstract_attack():
Expand Down
4 changes: 2 additions & 2 deletions foolbox/v1/adversarial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import numpy as np
import numbers

from .distances import Distance
from .distances import MSE
from ..distances import Distance
from ..distances import MSE


class StopAttack(Exception):
Expand Down
6 changes: 3 additions & 3 deletions foolbox/v1/attacks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from abc import abstractmethod

from ..adversarial import Adversarial
from ...adversarial import Adversarial as YieldingAdversarial
from ..adversarial import StopAttack
from ..criteria import Misclassification
from ..distances import MSE
from ...adversarial import Adversarial as YieldingAdversarial
from ...criteria import Misclassification
from ...distances import MSE


class Attack(abc.ABC):
Expand Down
2 changes: 1 addition & 1 deletion foolbox/v1/attacks/carlini_wagner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from .base import Attack
from .base import call_decorator
from ..utils import onehot_like
from ...utils import onehot_like


class CarliniWagnerL2Attack(Attack):
Expand Down
6 changes: 3 additions & 3 deletions foolbox/v1/attacks/deepfool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

from .base import Attack
from .base import call_decorator
from ..utils import crossentropy
from ..distances import MeanSquaredDistance
from ..distances import Linfinity
from ...utils import crossentropy
from ...distances import MeanSquaredDistance
from ...distances import Linfinity


class DeepFoolAttack(Attack):
Expand Down
2 changes: 1 addition & 1 deletion foolbox/v1/attacks/ead.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from .base import Attack
from .base import call_decorator
from ..utils import onehot_like
from ...utils import onehot_like


class EADAttack(Attack):
Expand Down
4 changes: 2 additions & 2 deletions foolbox/v1/attacks/hop_skip_jump_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from .base import Attack
from .base import call_decorator
from ..distances import MSE, Linf
from ..criteria import Misclassification
from ...distances import MSE, Linf
from ...criteria import Misclassification
import numpy as np
import math
from warnings import warn
Expand Down
8 changes: 4 additions & 4 deletions foolbox/v1/attacks/iterative_projected_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

from .base import Attack
from .base import call_decorator
from .. import distances
from ..utils import crossentropy
from ... import distances
from ...utils import crossentropy
from ... import nprng
from ..optimizers import AdamOptimizer
from ..optimizers import GDOptimizer
from ...optimizers import AdamOptimizer
from ...optimizers import GDOptimizer


class IterativeProjectedGradientBaseAttack(Attack):
Expand Down
2 changes: 1 addition & 1 deletion foolbox/v1/attacks/lbfgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .base import Attack
from .base import call_decorator
from .gradient import GradientAttack
from ..utils import crossentropy as utils_ce
from ...utils import crossentropy as utils_ce
from ... import rng


Expand Down
2 changes: 1 addition & 1 deletion foolbox/v1/attacks/localsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .base import Attack
from .base import call_decorator
from ..utils import softmax
from ...utils import softmax
from ... import nprng


Expand Down
2 changes: 1 addition & 1 deletion foolbox/v1/attacks/newtonfool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .base import Attack
from .base import call_decorator
from ..utils import softmax
from ...utils import softmax

import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion foolbox/v1/attacks/sparsefool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from .base import Attack
from .base import call_decorator
from ..utils import crossentropy
from ...utils import crossentropy


class SparseFoolAttack(Attack):
Expand Down

0 comments on commit 7806c6f

Please sign in to comment.